[postgis-users] query optimization
Frances Collier
fcollier at preparedresponse.com
Thu May 4 08:59:28 PDT 2006
Patricio Cifuentes Ithal,
That worked brilliantly. Thank you so much for your time.
Frances Collier
-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Patricio
Cifuentes Ithal
Sent: Wednesday, May 03, 2006 2:40 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] query optimization
hi...
add suplex query with extension....
example
WHERE SetSRID('BOX3D(".$ext[0]." ".$ext[1].",".$ext[2]."
".$ext[3].")'::box3d,-1) && the_geom ) as foo using unique gid using SRID=-1
only query result data viewer...
--
Patricio Cifuentes Ithal
Ingeniero en Informática
Informática
SIIGSA
(56-2) 204 60 22
----- Original Message -----
From: "Frances Collier" <fcollier at preparedresponse.com>
To: "'PostGIS Users Discussion'" <postgis-users at postgis.refractions.net>
Sent: Wednesday, May 03, 2006 5:20 PM
Subject: [postgis-users] query optimization
> Hello,
>
> I am trying to figure out a query that will return all the counties that
lie
> within a specific buffer. The following query accomplishes that, but it
> takes 537453ms. We will want to put this result into a web application so
we
> want to minimize the amount of time it takes. I would really appreciate
any
> help in optimizing this query.
>
> Query: select
> area(intersection(wkb_geometry,
> getItemBuffer(-122.330863952637, 47.2580032348633, 0.5))) as areaOfBuffer,
> state, county, area
> from tblcountypop
> where
> intersects(wkb_geometry, boundary(
> getItemBuffer(-122.330863952637, 47.2580032348633, 0.5)));
>
> getItemBuffer (function): select buffer(simplify(wkb_geometry,0.01),$3) as
> wkb_geometry
> from tblcountypop
> where within(MakePoint($1,$2),wkb_geometry);
>
> The tblcountypop was created from a shapefile and has (estimated) 6138
rows.
> I have indexed this table using gist. I have also vacuum analyzed it. I am
> using PostgreSQL 8.1 with the default PostGIS which I believe is version
> 1.0.4 but I haven't figured out how to find the version.
>
> Thank you very much,
> Frances Collier
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list