View Single Post
Old 04-03-2011, 11:55 AM   #14
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Quote:
Originally Posted by Iņigo View Post
That's the part I can't understand... whay can we use sqlite SORT, OFFSET and LIMIT clauses?
SELECT xxx FROM yyy WHERE zzz SORTBY sort OFFSET ooo LIMIT lll;?

I took a look at that code some time ago and maybe I can't remember properly...
It is no problem to use the sql statement (see global_select_common() in \libs\ermetadb\src\ermetadb_file.c) but I wonder if it really saves time to use the OFFSET/LIMIT. What is causing the big delay in the book-view with 3000 books?
1) Selecting/sorting all data from global.db?
2) Or is it caused by the information of these 3000 books that is kept into memory after the query (including thumbnail info)?
After measuring what is causing the biggest delay in the current code, changes can be made to measure the effect. (I.e. using OFFSET/LIMIT or maybe delayed loading of thumbnails.)
Mackx is offline   Reply With Quote