I have query like this:
employments.candidate_id AS candidate_id,
SUM(TS_RANK(employers.search_vector, TO_TSQUERY('simple', 'One:* |
Two:* | Three:* | Four:*'), 2)) AS ts_rank
employers ON employments.employer_id = employers.id
employers.search_vector @@ TO_TSQUERY('simple', 'One:* | Two:* |
Three:* | Four:*')
And it results with this:
The JOIN between employments and employers is the culprit. I'm unable
to get rid of the seq scan, and setting enable_seqscan to off makes
things even worse.
Is there any way to get rid of this JOIN?
What info should I post to debug this easier?
pgsql-performance by date
|Next:||From: Cesar Martin||Date: 2012-04-16 14:13:42|
|Subject: Re: H800 + md1200 Performance problem|
|Previous:||From: Florent Guillaume||Date: 2012-04-16 13:11:47|
|Subject: Re: Slow fulltext query plan|