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

2009-10-23 Thread Jesper Krogh
Tom Lane wrote: > Jesper Krogh 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/tsearc

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

2009-10-23 Thread Tom Lane
Jesper Krogh 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 wan

[PERFORM] Calculating selectivity for the query-planner on ts_vector colums.

2009-10-23 Thread Jesper Krogh
Hi 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: ftstest=# explain select id from ftstest where ftstest_body_fts @@ to_tsquery('nonexistingterm') order by id limit 10;