On Tue, 12 Jul 2011, Nicolas Grilly wrote:
> On Tue, Jul 12, 2011 at 22:25, Oleg Bartunov <oleg@sai.msu.su> wrote:
>> I don't see your query uses index :)
>
> Yes, I know. :)
>
> I ran VACUUM ANALYZE and re-ran the query but the output of EXPLAIN
> ANALYZE stays exactly the same: no index used.
>
> Any idea why?
there is problem with estimating of cost scanning gin index in < 9.1 versions,
so you can
set enable_seqscan=off;
or try 9.1 which beta3 now.
>
> By the way, does ts_rank is supposed to use a GIN index when it's available?
no, I see no benefit :)
Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83