Should I consider GIN index for several columns?
0
votes
1
answer
501
views
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.
Asked by zefciu
(101 rep)
Jan 18, 2024, 10:49 AM
Last activity: Jan 19, 2024, 02:21 AM
Last activity: Jan 19, 2024, 02:21 AM