Multicolumn BTree indexes

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Multicolumn BTree indexes

Antoine Gourlay
Hi everyone,

I just committed [1] to trunk support for multiple-column BTree indexes.

At the java API level, all methods of the IndexManager that took a field
name now can take an array of field names, which obviously indexes those
methods. The usual range queries (possibly reduced to a lookup for a
single value) are allowed.

At the SQL level, the syntax was expanded to support creating and
deleting multiple-column indexes, i.e. this is valid now: "CREATE INDEX
ON myTable(field1, field2, field3)" and same for DROP INDEX.

Only non-geometry column are supported, and only types that can be
sorted (numeric, string and date/time types).

Erwan, does this fits what you needed for your graph analysis? Have a
look into IndexManagementTest for two use cases.

The query planner currently does not use these indexes, but I'll looking
into using them for some simple cases...

[1] r13350 <> ; task #539

Antoine Gourlay