Re: [Zope] ZSQL batching with dtml-in
Ed Colmar wrote: Will the database be queried for all results, and only have 20 displayed, or will the database just return the 20 that are needed? The database will get hammered every time ;-) There was a thread between myself and Charlie from eGenix on the zope-db list earlier this week... ...and stop using dtml! *grinz* Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZSQL batching with dtml-in
Am Donnerstag, den 08.12.2005, 13:46 -0800 schrieb Ed Colmar: > Do ZSQL methods communicate with the dtml-in call and understand the > "size" attribute? Not really. > for example, in this dtml-in statement: > > > > Will the database be queried for all results, and only have 20 > displayed, or will the database just return the 20 that are needed? Well, this depends (in theory at least :) on the database adaptor. It could just fetch the results up to 20 but usually it will just fetch all and cut the batch out of it. This isnt so bad as it seems because you can have the ZSQL Method cache the result so the database isnt asked any time. You dont need DTML for batching. There is a batch module you can use in python scripts as well (and with ZPT) HTH Tino ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZSQL batching with dtml-in
Ed Colmar wrote: Do ZSQL methods communicate with the dtml-in call and understand the "size" attribute? for example, in this dtml-in statement: Will the database be queried for all results, and only have 20 displayed, or will the database just return the 20 that are needed? Thanks for the insight! -Ed ___ Ed, Just add a "Z Search Interface" to a folder that can acquire your zSQL method(s). I think it will create a sample of what you want to do in either ZPT or DTML. Then you can experiment. You can use the "advanced tab" to tell zSqL methods how many data records to download per get and how many to cache. David ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] ZSQL batching with dtml-in
Do ZSQL methods communicate with the dtml-in call and understand the "size" attribute? for example, in this dtml-in statement: Will the database be queried for all results, and only have 20 displayed, or will the database just return the 20 that are needed? Thanks for the insight! -Ed ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )