[Zope-DB] Z SQL equivelant of MySQL's SQL_CALC_FOUND_ROWS?
    Chris Withers 
    chris at simplistix.co.uk
       
    Tue Dec  6 04:48:29 EST 2005
    
    
  
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().
*sigh*
cheers,
Chris
-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk
    
    
More information about the Zope-DB
mailing list