Bug #183
project() isn't considered with index selection.
Added by Andrae Muys - about 15 years ago.
Updated about 15 years ago.
Description
select $p from <graph:data> where $s $p $o; uses the GSPO index which requires a full external sort of the store to extract $p. If we use GPOS we get $p without the sort.
The problem is that project() call doesn't participate in index ordering within the query optimisation.
The solution is to introduce an Annotation that allows the project to specify a preferred order. Initially supporting this Annotation with StatementStoreResolution will be sufficient to satisfy the query above. A general solution will also require supporting it with Join and Append tuples.
- Status changed from New to In Progress
(In r1510) refs #183
Migrate the ReresolvableResolution interface to the ReresolveAnnotation.
This clears up the dependency on class introspection for optimisation, allowing the wrapping of reresolvable
tuples without losing their ability to participate in optimisation.
(In r1542) refs #183
This double array allows us to identify which index will satisfy a desired ordering of the unbound variables,
or if we don't have the appropriate index available. Should we find an appropriate index we can avoid sorting
the resulting tuples. If the table returns -1, the sort is unavoidable, so we should default to the default
index selection to improve cache efficiency.
(In r1558) refs #183
Refactored XAStatementStoreImpl to seperate the selection of the index from the selection of the find method
on the index. This allows us to select the best valid index for a set of bound variables matching an ordering
preference for the unbound variables. This is necessary if higher level code is to avoid a sort.
(In r1564) refs #183
Passes all regression tests, untested is the actual preference based index
selection, one difficulty will be matching up the nodes with the index columns
based on index order.
Next step is to eliminate the switch statement by lifting it to a lookup table,
and writing some unit-tests for the new functionality.
(In r1569) refs #183
Added a phaseId to TripleAVLFile.Phase, to allow us to track which index a phase is being used for.
Added bind[1-4] methods to ensure findTuples parameters are matched up with the correct columns for the
relevant index.
(In r1570) refs #183
Missed updating unit-test to reflect new constructor signatures.
Updated XA11 to reflect new constructor signatures.
Also available in: Atom
PDF