Hi Burak,

I tried to do that initially. However, it seemed to me that this is only 
a viable solution if data gets sorted by id. Everything gets quite 
complicated if you try to sort a table by other entries, e.g. 
alphabetically, let's say by a column named "title". Then you would have 
to save the last title value of the last row returned by your last query 
and find all entries following alphabetically - which only works if 
there are no duplicate entries, otherwise you would have to save the 
ids, too. Furthermore, you would have to deal with the possibility of 
null entries in title values, so it is not that easy to make the right 
kind of database queries.

Maybe these are only minor problems but there seem to be some of these. 
I stopped at some point when trying to implement your suggestion. It may 
be worth the effort with very large databases, but I'm not sure about 
that. However, I would be interested to know if someone made a succesful 
approach on this.

Cheers,

Michael

Burak Arslan schrieb:
> all,
>
> the current method to produce responses to remote table models is to use 
> the underlying database's limit & offset method. while being the 
> simplest solution, offsetting is either
>
> 1) slow
> 2) fast when the query is cached on the server side, but then it's 
> costly in memory.
>
> i don't think this problem has a %100 solution.
>
> but i see an optimization opportunity: the table could make the job of 
> the database management system much easier by sending the sorting key 
> from the last row of the previous block, if it's already fetched. (or 
> analogously, the sorting key from the first row of the next block, if 
> it's already fetched.
>
> this way, the sql query can be:
>
> (...) where (...) and id > 200000 limit 50
>
> instead of
>
> (...) limit 50 offset 128475
>
> the former query will instantly sweep off the initial rows, while the 
> latter will iterate over the initial rows only to ignore them.
>
> do you think implementing this would be worth the effort ?
>
> awaiting your feedback,
>
> best regards
> burak
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
> looking to deploy the next generation of Solaris that includes the latest 
> innovations from Sun and the OpenSource community. Download a copy and 
> enjoy capabilities such as Networking, Storage and Virtualization. 
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>   


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to