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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query planner always has exactly half of the rows in the table as "plan rows" with new GIST operator class
Дата
Msg-id 3462.1320086509@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Query planner always has exactly half of the rows in the table as "plan rows" with new GIST operator class  (Adrian Schreyer <ams214@cam.ac.uk>)
Список pgsql-general
Adrian Schreyer <ams214@cam.ac.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Schreyer
Дата:
Сообщение: Query planner always has exactly half of the rows in the table as "plan rows" with new GIST operator class
Следующее
От: Tarlika Elisabeth Schmitz
Дата:
Сообщение: Re: [PL/pgSQL] function call