Skip to content

Support expression indexes #1530

@jussisaurio

Description

@jussisaurio

https://www.sqlite.org/expridx.html

CREATE TABLE t(a);
CREATE INDEX ti on t(a+1);
CREATE INDEX tid on t(concat(a, 'dsfkljdksl'));

The SQLite query planner will consider using an index on an expression when the expression that is indexed appears in the WHERE clause or in the ORDER BY clause of a query, exactly as it is written in the CREATE INDEX statement. The query planner does not do algebra. In order to match WHERE clause constraints and ORDER BY terms to indexes, SQLite requires that the expressions be the same, except for minor syntactic differences such as white-space changes.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions