Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
3.3.0
Description
In the typical usage of SPARQL retrieving all properties for a concrete type:
SELECT ?uri ?var1 ?var2 ?varN WHERE { ?uri a ex:type ; ex:var1 ?var1 ; ex:var2 ?var2 ; ex:varN ?varN . }
KiWI performs quite bad, because it creates a CROSS JOIN for each property:
SELECT PN.object AS VN, P2.object AS V2, P1.subject AS V1 FROM triples P1 CROSS JOIN triples P2 CROSS JOIN triples PN WHERE P1.deleted = false AND P1.predicate = 520554470573084672 AND P1.object = 520588903665881088 AND (P1.context = 539803406462763008) AND P2.deleted = false AND P1.subject = P2.subject AND P2.predicate = 520554473039335424 AND (P2.context = 539803406462763008) AND PN.deleted = false AND P1.subject = PN.subject AND PN.predicate = 527860595421151232 AND (PN.context = 539803406462763008)
Making the subject fixed is actually a quite fast query.