compared with
Current by Vladimir Alexiev
on Apr 01, 2013 11:02.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (4)

View Page History
- We want all objects whose interval "P82a-P82b" *intersects* the search interval "from-to".
This can be translated to
{code:sql} {noformat}
{from <= P82 <= to}
UNION
{P82a <= from < to <= P82b}
{code} {noformat}
- The query searches along this property path: P108i_was_produced_by / P4_has_time-span / P82_at_some_time_within
- Objects could specify dates as [date vs gYearMonth vs gYear] (RKD has date and gYear, BM has date, none have gYearMonth)
-- Currently this index has a limitation that it works only for conjunction (not disjunction, negation, etc), so we must use UNION and not ||
{code:sql}
FILTER(?x < 3 || ?x > 5) # -- DOES NOT use the index
{... FILTER(?x < 3)} UNION {... FILTER(?x > 5) # -- uses the index
{code}