Re: [Tracker] What's the fast method to get partial items after sorting.



hi, Zhenquiang

On 3/12/10, Chen, Zhenqiang <zhenqiang chen intel com> wrote:

I have lots of photos. I want to get part of them after sorting. I use
series of queries like:

tracker-sparql -q "SELECT ?photo WHERE{?photo a nmm:Photo} ORDER BY
ASC(?photo) OFFSET 1000 LIMIT 100"
...
tracker-sparql -q "SELECT ?photo WHERE{?photo a nmm:Photo} ORDER BY
ASC(?photo) OFFSET 2000 LIMIT 100"

"Order" seams expensive in tracker.
How to use index? What's the best way to do it?

Those queries look pretty useless, you are getting a list of sorted
uris of pictures (generated uris, not even the real location). You are
sorting a list like "urn:uuid:1273628", "urn:uuid:98377273", ...

your usage of offse and limit is fine though. We cannot help with the
performance of such a "laboratory" query. could you try with a more
realistic example?

regards,

ivan

Thanks!
-Zhenqiang




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]