Charlie Clark wrote:
I wonder how the two methods compare efficiency-wise?

Yes, well, we're talking about MySQL specifically ;-)

Well, with reference to Zope we shouldn't be...

Huh? the original poster was talking about MySQL, why should he care about any other rdb?

Not so. Think of batches:

"Now showing Results 5 - 10 of 25"

But why not just return all the rows and only show 5 of them?

"Now showing Results 5 - 10 of 250000"

Yes, let's talk about batches - ZSQL doesn't implement batching so it collects the whole set of results available so len() is available.

How would you implement batching in a way that's agnostic of the rdb used?

Result sets aren't supported directly

by what?

so unless the DA provides a method to query on the connection or cursor you will also have to run a separate query with count().




Simplistix - Content Management, Zope & Python Consulting

Zope-DB mailing list

Reply via email to