[postgis-users] Re: SRID, misc queries

Gregory Williamson Gregory.Williamson at digitalglobe.com
Wed Oct 17 11:44:30 PDT 2007


Brian --

Vacuum cleans out dead tuples from tables; did you perhaps mean you ran "ANALYZE" ? Which is the beast that does the statistics update that the planner needs to make use of indexes. 

HTH,

Greg Williamson
Senior DBA
GlobeXplorer LLC, a DigitalGlobe company

Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information and must be protected in accordance with those provisions. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

(My corporate masters made me say this.)

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net on behalf of Brian Hamlin
Sent: Wed 10/17/2007 12:36 PM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] Re: SRID, misc queries
 
ok, no one bothered to point out my obvious mistake in the order 
lon/lat in the Polygon query...

Aside from that, I just double checked the SRIDs, dropped and reloaded 
the GIST indexes for both the POINT and MULTIPOLYGON tables, both in 
4326, vacuumed and vacuumed again.

The basic question still stands - if I dont SetSRID(), I get a mixed 
SRID error msg
with the SetSRID(), the Points in Polys takes 10 seconds to execute. 
That seems like a long time.

Is this expected performance?
Mac OS 10.10,  Powerbook 1ghz g4, decent 54gb internal drive

Why the mixed SRIDs error without the explicit calls?

>
> SELECT gectable.name
> FROM just_ca, gectable
> WHERE
>         just_ca.city = 'Berkeley'
> AND
>  st_within( SetSRID(gectable.geom_pts2,4326),
>   SetSRID( just_ca.the_geom,4326))
>
> this takes 10 seconds on 110,000 points (and 12 polys in city 
> Berkeley).
> (I added a GIST index on geom_pts2 and the_geom, and the query took
> the same amount of time as without indexes.  just_ca.city = 'Berkeley' 
> alone
> takes just 4ms)
>
> The following query gets a mixed SRID error
>
> SELECT gectable.name
> FROM just_ca, gectable
> WHERE
>         just_ca.city = 'Berkeley'
> AND
>  st_within(  gectable.geom_pts2, just_ca.the_geom )
>
> why??

_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20071017/3cad0b7e/attachment.html>


More information about the postgis-users mailing list