Skip site navigation (1) Skip section navigation (2)

Re: Calculating selectivity for the query-planner on ts_vector colums.

From: Jesper Krogh <jesper(at)krogh(dot)cc>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Calculating selectivity for the query-planner on ts_vector colums.
Date: 2009-10-23 19:29:45
Message-ID: 4AE20429.4020202@krogh.cc (view raw or flat)
Thread:
Lists: pgsql-performance
Tom Lane wrote:
> Jesper Krogh <jesper(at)krogh(dot)cc> writes:
>> It seems to me that the row estimates on a ts_vector search is a bit on
>> the low side for terms that is not in th MCV-list in pg_stats:
> 
> tsvector has its own selectivity estimator that's not like plain scalar
> equality.  Look into src/backend/tsearch/ts_selfuncs.c if you want to
> see the rules.

Thanks.

least_common_frequence / 2
Which also gives 33 in my situation.

-- 
Jesper




In response to

pgsql-performance by date

Next:From: Jesper KroghDate: 2009-10-23 20:32:53
Subject: Re: Full text search - query plan? PG 8.4.1
Previous:From: Jeff DavisDate: 2009-10-23 19:22:03
Subject: Re: Queryplan within FTS/GIN index -search.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group