In our application we have a field that can be used to match with several columns in our database. So if the user searches for somestring
we will return all the rows WHERE column1 = 'somestring' OR column2 = 'somestring'
etc. We are using Postgres.
I am wondering if it is viable to use GIN
index for this purpose. Normally i see GIN
indexes used for long and variable-length data, however. So I am wondering there is any point using them to index short, fixed length tsvector
s or should I just index each column separately with a BTREE
and let the planner handle the search.