Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Currently array indexes only support indexing on the elements of an array. It would be beneficial to add atomic fields as prefix(es) / suffix(es) to an array index, to allow for more queries to use an array index as an access method.
As it stands composite array indexes are allowed in the grammar and should be maintainable (i.e. bulk loading, insert, delete, and upserts should work), but care must be given when recognizing that the index is applicable. In the IntroduceSelectAccessMethodRule, we currently only attempt to optimize a single SELECT (and thus, only keep context for that specific SELECT)- but applicable composite atomic-array index queries have SELECTs that span multiple levels (one before the unnest and one after).