[Dbix-class] extended paging

Hartmaier Alexander Alexander.Hartmaier at t-systems.at
Tue Dec 1 18:34:04 GMT 2009


The data might change between page loads too.

Best regards, Alex

Am 01.12.2009 um 19:16 schrieb "Matija Grabnar" <matija at serverflow.com>:

> Rodrigo wrote:
>> Ideally, I think the paging algorithm somewhere should handle a
>> callback filter sub and be able to fetch a few more rows (until a
>> page
>> is completed), in case the filter dropped. Well, something in the
>> lines:
>> ....
>> At worst case, all million CD table rows are read and thrown out,
>> which could result in a performance loss, but a working paging
>> algorithm.
> I've thought of that, but it wouldn't work (without somehow saving
> state
> in external table or something).
> Why? Imagine that you have a page with 20 lines, and a huge table. You
> fetch the first page, throw away
> 2000 lines, and finally get the 20 lines you need.
>
> Then the script fetches the second page. But where do you start
> scanning? You would have to somehow remember where the end of the
> first
> page was. In a script that was breaking the table into one page after
> another, that's not a problem. But in a Catalyst context, it
> definitely
> IS a problem: you can't rely on the same process fetching page 2 as
> was
> the process fetching page 1. So you would have to SAVE the position of
> the end of page 1 somewhere outside the process. Which is why I talked
> about setting up another table that would hold the indexes of the
> pages
> in the first table.
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*



More information about the DBIx-Class mailing list