Re: procost for to_tsvector - Mailing list pgsql-hackers

From Robert Haas
Subject Re: procost for to_tsvector
Date
Msg-id CA+Tgmob7kHFdOMM3DHeFsDcA2sh-VU7efx221wfZqdMBRsYi9w@mail.gmail.com
Whole thread Raw
In response to Re: procost for to_tsvector  (Bruce Momjian <bruce@momjian.us>)
Responses Re: procost for to_tsvector  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Thu, Apr 30, 2015 at 9:34 PM, Bruce Momjian <bruce@momjian.us> wrote:
> On Wed, Mar 11, 2015 at 02:40:16PM +0000, Andrew Gierth wrote:
>> An issue that comes up regularly on IRC is that text search queries,
>> especially on relatively modest size tables or for relatively
>> non-selective words, often misplan as a seqscan based on the fact that
>> to_tsvector has procost=1.
>>
>> Clearly this cost number is ludicrous.
>>
>> Getting the right cost estimate would obviously mean taking the cost of
>> detoasting into account, but even without doing that, there's a strong
>> argument that it should be increased to at least the order of 100.
>> (With the default cpu_operator_cost that would make each to_tsvector
>> call cost 0.25.)
>>
>> (The guy I was just helping on IRC was seeing a slowdown of 100x from a
>> seqscan in a query that selected about 50 rows from about 500.)
>
> Where are we on setting increasing procost for to_tsvector?

We're waiting for you to commit the patch.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: PATCH: adaptive ndistinct estimator v4
Next
From: Robert Haas
Date:
Subject: Re: Proposal : REINDEX xxx VERBOSE