RE: [Zope] ZSQL method broken on 2.1.6
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Andreas > Sent: Saturday, June 10, 2000 1:59 AM > To: Umesh Soni > Cc: Phill Hugo; [EMAIL PROTECTED] > Subject: Re: [Zope] ZSQL method broken on 2.1.6 > > > >> > > >> (using zope 2.1.6 with ZMySQLDA-2.0.0a1 and MySQLdb-0.2.1) > > >> > As I know so far there is no way to disable this property or to set a > value like 'maximum' This version of ZMySQLDA (and possibly others) doesn't put the LIMIT statement in at all if you set the maximum number of rows to 0 (zero). Like someone else said, it's a "safety net" for queries that may accidently return way too many records. ___ Ron Bickers Logic Etc, Inc. [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZSQL method broken on 2.1.6
Andreas writes: > ZSQLMethod's "advanced" property 'Maximum number of rows retrieved' > makes no sense to me. It prevents stupid queries to kill Zope. Assume, such a query returns 100.000.000 records. This probably will let Zope require several GB memory. > As I know so far there is no way to disable this property or to set a > value like 'maximum' What about a value of 2.000.000.000. Should be enough for most purposes. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZSQL method broken on 2.1.6
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[EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZSQL method broken on 2.1.6
>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. Anyway it's working now --cheers. Umesh Soni. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZSQL method broken on 2.1.6
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 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )