Re: Query planner always has exactly half of the rows in the table as "plan rows" with new GIST operator class

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adrian Schreyer <ams214(at)cam(dot)ac(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Query planner always has exactly half of the rows in the table as "plan rows" with new GIST operator class
Date: 2011-10-31 18:41:49
Message-ID: 3462.1320086509@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian Schreyer <ams214(at)cam(dot)ac(dot)uk> writes:
> I have added a GIST operator class to a custom data type in
> PostgreSQL. The index returns the correct results and the build speed
> is fairly good as well. There is one problem however that is
> presumably linked to the picksplit function (?) - the query planner
> always returns half of all the rows in the table as (after vacuum)
> "Plan Rows".

Uh, no, picksplit is not where your problem is. You need to provide a
selectivity estimation function for your indexable operator. It sounds
like you don't have one at all, and restriction_selectivity() is
defaulting to 0.5.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gauthier, Dave 2011-10-31 18:51:50 does reindex need exclusive table access?
Previous Message Tarlika Elisabeth Schmitz 2011-10-31 18:18:08 Re: [PL/pgSQL] function call