OWLIM-SE Indexing Specifics

compared with
Current by barry.bishop
on Jan 31, 2012 11:16.

(show comment)
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (11)

View Page History
h1. Literal index

As of OWLIM-SE version 4.4, an additional index is automatically built that allows faster look-ups of numeric and date/time object values. The index is used during query evaluation only if a query or a subquery (e.g. union) has a filter that is comprised of a conjunction of literal constraints using comparisons and equality (but no negation or inequality), e.g. FILTER(?x >= 3 = 100 && ?y <= 5 && ?start > "2001-01-01"^^xsd:date)
Other patterns, including those that use negation, will not use the index in this version of OWLIM, i.e. no attempt is made to re-write filters into usable patterns.

For example, these FILTER patterns will all make use of the literal index:

{noformat}
FILTER( ?x = 7 )
FILTER( 3 < ?x )
FILTER( ?x >= 3 && ?y <= 5 )
FILTER( ?x > "2001-01-01"^^xsd:date )
{noformat}


{noformat}
FILTER( ?x > (1 + 2) )
FILTER( ?x < 3 || ?x > 5 )
FILTER( (?x + 1) < 7 )
FILTER( ! (?x < 3) )
{noformat}

Negation is also not handled, so patterns such as:

{noformat}
FILTER(!(?x < 3))
{noformat}

will also not make use of the literal index.

Equality expressions, e.g. FILTER(?x = 7), also don't use the literal index. For now, the same effect can be obtained by re-writing the filter as FILTER(?x <= 7 && ?x >= 7).

NOTE: Due to the way that literals are stored, dates far in the future and far into the past (approximately 200,000,000 years forward or backward) will behave unexpectedly. Also, numbers beyond the range of 64-bit floating-point representation, i.e. above approximately 1e309 and below -1e309 will behave unexpectedly.