Search Postgresql Archives

GIN Expression Indexes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi friends!

We tried to index an array function like this:

  CREATE INDEX my_arr_index ON my_table USING GIN ( my_arr_func( my_col ) )

But the planner can’t seem to figure out how to use the index with any query! It doesn’t work with any array operators.

  SELECT * FROM my_table WHERE ARRAY[ 123 ]::INT[] && my_arr_func( my_col )

Even weirder, an empty array correctly uses the index:

  SELECT * FROM my_table WHERE ARRAY[]::INT[] && my_arr_func( my_col )

Is there any way to coerce Postgres into using this index? Thanks!

ts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux