If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > PostgreSQL > spatial query slow T_T any recommendation?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-14-10, 19:28
nhk15 nhk15 is offline
Registered User
 
Join Date: Oct 2010
Posts: 1
spatial query slow T_T any recommendation?

Hi,

I've got a table which has 12 milions records with Point geometry column.
I've added an index on the geometry column.

My query is really simple points search within a polygon.

SELECT count("the_geom") FROM table WHERE "the_geom" && GeomFromText('POLYGON ((.xxxxxxxx, xxxxx,....))', 4326)

It usally takes around 25 seconds returning 20,000 records.
I think 25 seconds is slow. Do you think it's normal?
I've played around with shared_buffers size in the conf but didn't improve at all.

Has anyone got any suggetions to improve?

Cheers,
N
Reply With Quote
Reply

Tags
postgis, postgres, spatial query

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On