Paolo Castagna wrote: > Hi, > one thing which often people do/need is to paginate between results using > OFFSET + LIMIT and when they do it they often ORDER BY something their > results. > > I saw the "pseudo paging via query analysis of ORDER BY / OFFSET / LIMIT > access patterns" idea in https://github.com/afs/LD-Access and it's great. > > Is there something we could do in ARQ (not caching) to optimize queries > which have ORDER BY + OFFSET + LIMIT?
Maybe we can assume users will not hit 'next page' too many times. Have you tried to see how many pages can you get from Google? :-) We can increase the TOPN_LIMIT_THRESHOLD in TransformTopN to 100000 (?) and apply the same TopN optimization we discussed in JENA-89 even when we have OFFSET (when OFFSET + LIMIT < TOPN_LIMIT_THRESHOLD). In QueryIterTopN we simply return IteratorArray.create(y, offset, limit) instead of IteratorArray.create(y). What do you think? If you like the idea, I'll create a JIRA for it and see if we can get this done. Paolo > > If you have useful ideas, suggestions or interesting papers, please, > point me at it. > > Thanks, > Paolo
