Re: cannot get stable function to use index

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: cannot get stable function to use index
Дата
Msg-id 20564.1451500547@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: cannot get stable function to use index  (Andy Colson <andy@squeakycode.net>)
Ответы Re: cannot get stable function to use index  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Andy Colson <andy@squeakycode.net> writes:
> No, that's not right, the table was empty.  I rebuilt the table as it
> was before, here are all three queries again:

Ah, thanks for the more solid data.

>     ->  Bitmap Index Scan on search_key  (cost=0.00..63623.00 rows=1 width=0) (actual time=4.996..4.996 rows=1
loops=1)
>           Index Cond: (search_vec @@ to_tsquery('213 & E & 13 & ST & N:*'::text))

>     ->  Bitmap Index Scan on search_key  (cost=0.00..23.00 rows=1 width=0) (actual time=4.057..4.057 rows=1 loops=1)
>           Index Cond: (search_vec @@ to_tsquery('213 & E & 13 & ST & N'::text))

This says there's only about a 25% runtime penalty for the partial match,
at least on your example, compared to the planner's estimate of 2700x
penalty :-(.  Definitely need to fix that.

            regards, tom lane


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

Предыдущее
От: Andy Colson
Дата:
Сообщение: Re: cannot get stable function to use index
Следующее
От: Tom Lane
Дата:
Сообщение: Re: cannot get stable function to use index