Re: BUG #4810: Complex Contains, Bad Performace.
| От | Paul Matthews |
|---|---|
| Тема | Re: BUG #4810: Complex Contains, Bad Performace. |
| Дата | |
| Msg-id | 4A0FE8A3.7020700@netspace.net.au обсуждение исходный текст |
| Ответ на | Re: BUG #4810: Complex Contains, Bad Performace. (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-bugs |
Tom Lane wrote:
"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
WHERE
g.boundary @> polygon(box(w.geocode,w.geocode));
Is there are more convenient, less ugly, way to convert a point to a
polygon?
В списке pgsql-bugs по дате отправления: