darklow <darklow(at)gmail(dot)com> writes:
> But the performance problems starts when i do the same query specifying
> *SELECT id FROM cache WHERE tsv @@ to_tsquery('test:*') limit 20;*
> By some reason index is not used.
It apparently thinks there are enough matches that it might as well just
seqscan the table and expect to find some matches at random, in less
time than using the index would take.
The estimate seems to be off quite a bit, so maybe raising the stats
target for this column would help.
regards, tom lane
In response to
pgsql-performance by date
|Next:||From: Andreas Kretschmer||Date: 2012-01-10 17:09:37|
|Subject: Re: Partitioning by status?|
|Previous:||From: Mike Blackwell||Date: 2012-01-10 16:57:04|
|Subject: Partitioning by status?|