[Zope] ZSQL method broken on 2.1.6

Andreas andreas@ahit.de
Fri, 09 Jun 2000 22:58:35 -0700


Umesh Soni wrote:
> 
>  >Umesh Soni wrote:
>  >>
>  >> (using zope 2.1.6 with ZMySQLDA-2.0.0a1 and MySQLdb-0.2.1)
>  >>
>  >> Hi there,
>  >>
>  >> I had this ZSQL method (simplified for clarity) working on 2.1.4
>  >>
>  >> select id, nickname  from bboard
>  >> where id<=50
>  >> order by id desc
>  >> limit 30
>  >
>  >Remove either the limit 30 or the LIMIT 1000 Advanced property of the
>  >ZSQL method (advanced tab). To speed things up, the limit 1000 appended
>  >to the query to stop MySQL giving Zope lots of lines when it only wants
>  >1000 anyway. Its not too clever though. There should maybe be a check to
>  >see if "limit x" exists in the query.
>  >
>  >Phill
>  >
> 
> Thanks Phill, that did the trick --strange thing though the 'Maximum
> number of rows retrieved attribute' was set to 100 not 1000 as the
> error reported --I changed it to 30.
> 

I`m  interested in your thoughts about ZSQLMethod's advanced 
property 'Maximum number of rows retrieved'. It`s default value is 1000. 
Some DA's like PyGreSQLDA takes no notice on this value while PoPyDA
pays 
attention of this property.

Assumed there is a table foo on my DB with actually 2000 records some
DA's
return only 1000 on table scans like 'select * from foo' and 10 records
on 
'select * from foo limit 10 offset 1100' (if offset is supported by the
RDBMS).

How can I know how many records will match at max to my select
statement? 

ZSQLMethod's "advanced" property 'Maximum number of rows retrieved'
makes no sense to me. 

As I know so far there is no way to disable this property or to set a
value like 'maximum'


-- 
_________________________________________________________
Andreas Heckel                            andreas@aHIT.de