Cédric Villemain wrote: > Le Wednesday 16 April 2008, Magnus Hagander a écrit : > > Cédric Villemain wrote: > > > Notice that : > > > > > > http://search.postgresql.org/search?q=tom+lane&m=1&l=&d=1&s=r > > > and > > > http://search.postgresql.org/search?q=tom+lane&m=1&l=&d=1&s=d > > > > > > do not provide same result (3 results by date, 1 by rank) even if > > > only the sorting is changed. > > > > Actually, I get 5 and 7, in the other order. > > > > The reason for this is that Tom Lane is way too active. It's > > gin_fuzzy_search_limit that's doing the restriction first, and the > > date restriction comes in later. > > Yes, you are perfectly right. Can I suggest to deactivate > gin_fuzzy_search_limit (or increase the value) when one condition > (and use the condition earlier) can considerably reduce the number of > results (like the 'post date' here) ?
You'd have to convince the planner to actually not use an indexscan at all on the tsvector. Normally it'll choose an index scan on each and then a bitmap join, and we don't want to bring back so many rows... //Magnus -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers