← Back to team overview

launchpad-dev team mailing list archive

Re: performance tuesday: better batches are -go-

 

On 21.09.2011 00:23, Robert Collins wrote:
> https://code.launchpad.net/~adeuring/launchpad/bug-739052-9/+merge/76241
> 
> That is all.

Minor addition: I started the ec2 test for this branch just now. Let's
wait if any new bug raises its ugly head ;)

Assuming that the fix works as expected, using StormRangeFactory to fix
timeouts caused by slow count(*) queries and/or slow SQL counting to
find the OFFSET of a result, should be easy to fix, just by using
StormRangeFactory when you create a Batch in a view.

Caveat: StormRangeFactory works only with Storm ResultSets, and only if
the result set is ordered by Storm Columns. In other words:

   resultset.orde_by('Person.id')

does not work, but

   resulset.order_by(Person.id)

works.

Abel


References