From: | Paul Matthews <plm(at)netspace(dot)net(dot)au> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #4810: Complex Contains, Bad Performace. |
Date: | 2009-05-17 10:36:19 |
Message-ID: | 4A0FE8A3.7020700@netspace.net.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Tom Lane wrote:
<blockquote cite="mid:2470(dot)1242396221(at)sss(dot)pgh(dot)pa(dot)us" type="cite">
<pre wrap="">"Paul Mathews" <a class="moz-txt-link-rfc2396E" href="mailto:plm(at)netspace(dot)net(dot)au"><plm(at)netspace(dot)net(dot)au></a> writes:
</pre>
<blockquote type="cite">
<pre wrap="">Despite the existence of the index, postgresql is determined to full table
scan when given.
SELECT
postcode
WHERE
boundary @> point 'x,y';
</pre>
</blockquote>
<pre wrap=""><!---->
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
</pre>
</blockquote>
WHERE<br>
g.boundary @> polygon(box(w.geocode,w.geocode));<br>
<br>
Is there are more convenient, less ugly, way to convert a point to a
polygon?<br>
<br>
</body>
</html>
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/html | 1.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Helena Biander | 2009-05-17 15:56:51 | BUG #4813: Database can not be initialized |
Previous Message | Dave Page | 2009-05-17 09:13:40 | Re: Perl 5.10 vs. PG 8.4 on Win32 |