[postgis-users] PERFORMANCE PROBLEMS II (More Data)

Alvaro Zabala alvaro_zabala at hotmail.com
Tue Mar 2 05:59:21 PST 2004


My Java application is a JUMP plugin.
Refraction's plugin es good, but it works downloading all features from 
database, to work with them in memory.
We are working with massive datasets, and we need to execute one query by 
rectangle any time.
(When changing zoom level, plugin execute a query by rectangle)

I've made a query explain -to see if the query is using spatial index) and I 
get:
"Index Scan using spt_index_muni on municipios  (cost=0.00..5.95 rows=1 
width=86)"
It uses spatial index.
May I improve the query execution time? How?
My table only has 700 rows.



>From: "Alvaro Zabala" <alvaro_zabala at hotmail.com>
>Reply-To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
>To: postgis-users at postgis.refractions.net
>Subject: Re: [postgis-users] PERFORMANCE PROBLEMS
>Date: Tue, 02 Mar 2004 13:53:50 +0100
>
>Hi! Im developing an app which acceses PostGIS with JDBC. I have a table 
>with a geometry column, and Ive created an spatial index on this geometry 
>column. The main query is like this:
><query>
>SELECT  asText(GEOMETRY) AS GEOMETRY,C_PV,C_OCA,D_OCA,GID FROM ocas WHERE 
>GEOMETRY && 'BOX3D(88034.16 3926963.056375266, 634143.4400000001 
>4339164.943624733'::box3d
></query>
>
>I've noticed that this is a very slow query.
>May I force the use of the spatial index? How can I do that?
>May I use instead of this query a PostgreSQL cursor?
>What are advantages of cursor?
>Thanks in advance!!
>
>_________________________________________________________________
>STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
>http://join.msn.com/?page=features/junkmail
>
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users


Alvaro Zabala Ordóñez
Ingeniero en Geodesia y Cartografía.
Ingeniero Técnico en Topografía.

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




More information about the postgis-users mailing list