On 2009-11-14 16.30, Niclas Hedhman wrote:
A bit more extensive tests.
Populating 100,000 entities as given by Jacek.

Then I query for 5 different entities via name(), without DISTINCT and
without FILTER (literal on the ns1:name predicate )

The times are;
Retrival time of Lead64532 by name: 220
Retrival time of Lead98276 by name: 24
Retrival time of Lead2 by name: 5
Retrival time of Lead14332 by name: 4
Retrival time of Lead632 by name: 3


This doesn't solve the "complex filter" case though...

I made some changes to the SPARQL query parser, which now tries to inline "=" comparisons if possible (both for properties and associations). Many times this then leads to empty FILTER blocks, and so the queries are MUCH faster.

For the Lead-test (which is available in the qi4j-tests repo as RdfPerformanceTest) the query times went from about 1.5-2 seconds down to less then 10ms. Pretty drastic improvement.

The rule I use is: if an = is not used within an "or"-statement, then it's ok to inline the value comparison. If there's an "or" going on then I think the FILTER still has to be used, to get correct semantics.

I've tried adding some more tests for this, but it's hard to know if it's "good enough". Try it out and let us know if all the semantics are ok.

/Rickard

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to