W3C home > Mailing lists > Public > public-sparql-dev@w3.org > April to June 2009

Re: LIMIT problem (Paging)

From: Steve Harris <swh@ecs.soton.ac.uk>
Date: Mon, 25 May 2009 10:05:18 +0100
Cc: public-sparql-dev@w3.org
Message-ID: <EMEW3|1f99d12202add7ce8daa9c694e7d098al4OA5Q03swh|ecs.soton.ac.uk|268-4942-B644-A9CDB9ED7565@ecs.soton.ac.uk>
To: Mirko <idonthaveenoughinformation@googlemail.com>
On 23 May 2009, at 17:41, Mirko wrote:

> Hi all,
> I have an understanding problem with paging (limit/offet) in Sparql.
>
> Consider the following query:
>
> Select ?userID ?itemID ?date WHERE {
>  ?user my:hasUserID ?userID
> .. ?user my:owns ?item
> .. ?item my:hasItemID ?itemID
> .. ?item my:soldToUser ?date
> .. FILTER (?date > 20090101)
> }
> ORDER BY ?userID
> LIMIT 1000
> OFFSET 0
>
> A user might own multiple items.
>
> The results are to large to keep in memory, so I would like to page  
> them using LIMIT and OFFSET. However it does not work with the above  
> query. The query above needs all results to be loaded into memory  
> when evaluating it. I assume this is because more than one statement  
> is evaluated in the WHERE clause(?).

It should work in theory, I think this is a question for whoever wrote  
your RDF store.

- Steve
Received on Monday, 25 May 2009 09:06:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 25 May 2009 09:06:08 GMT