Re: BUG #4810: Complex Contains, Bad Performace.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #4810: Complex Contains, Bad Performace.
Дата
Msg-id 2470.1242396221@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #4810: Complex Contains, Bad Performace.  ("Paul Mathews" <plm@netspace.net.au>)
Ответы Re: BUG #4810: Complex Contains, Bad Performace.
Список pgsql-bugs
"Paul Mathews" <plm@netspace.net.au> writes:
> Despite the existence of the index, postgresql is determined to full table
> scan when given.
>   SELECT
>     postcode
>   WHERE
>     boundary @> point 'x,y';

polygon @> point isn't an indexable operator.  The indexable operators
for a gist index on polygon are

 <<(polygon,polygon)
 &<(polygon,polygon)
 &&(polygon,polygon)
 &>(polygon,polygon)
 >>(polygon,polygon)
 ~=(polygon,polygon)
 @>(polygon,polygon)
 <@(polygon,polygon)
 &<|(polygon,polygon)
 <<|(polygon,polygon)
 |>>(polygon,polygon)
 |&>(polygon,polygon)
 ~(polygon,polygon)
 @(polygon,polygon)

So it looks like you need to convert the point to a one-point polygon.

            regards, tom lane

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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: [HACKERS] Re: BUG #4796: Recovery followed by backup creates unrecoverable WAL-file
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: [HACKERS] Re: BUG #4796: Recovery followed by backup creates unrecoverable WAL-file