[fulltext] GIN indexes - OR search

Поиск
Список
Период
Сортировка
Искать

[fulltext] GIN indexes - OR search

От:
esemba <esemba@gmail.com>
Дата:

Is it possible to have 2 gin indexes and OR the search of them? 
Problem is, I need to search 5 columns and there is limitation of only 4
weights, so I want to have one index of 4 vectors and second index of 1
vector and need to OR the search.
When I try to search them separately, or use AND, it works, but for OR
EXPLAIN ANALYZE shows me, it does seq scan. 

Thank you.
-- 
View this message in context: http://www.nabble.com/-fulltext--GIN-indexes---OR-search-tp22781900p22781900.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Re: [fulltext] GIN indexes - OR search

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
esemba  writes:
> Is it possible to have 2 gin indexes and OR the search of them? 

Sure.  They need to be fairly restrictive though, or the planner might
decide that a seqscan is cheaper.

			regards, tom lane
FAQ