3 ms·
A very justified question, and it seems clear that database systems will increasingly do this automatically in the future. For comparison: A very similar issue
by triska 8y ago
A very justified question, and it seems clear that database systems will increasingly do this automatically in the future.
For comparison: A very similar issue arises in Prolog, where indexing is traditionally performed only on the outermost functor and arity of the first predicate argument to efficiently decide which clauses are applicable if that argument is sufficiently instantiated at the time the predicate is invoked.
In the recent past, Prolog systems have employed increasingly sophisticated techniques such as JIT indexing, multi-argument indexing and deep indexing to automatically select applicable clauses very efficiently in much more general situations.
So, the actual question seems more like "Why don't databases create their own indices yet?", and if the developments from the Prolog community are any indication, then maybe more urgent or more interesting tasks had to be solved first.