I'm a newbie in postgis and I have a problem in query performance.
This my query:
SELECT DISTINCT ON (userid) userid ,ST_AsText(position), timestamp
FROM table1
WHERE ST_Intersects ( ST_GeomFromText('a multiypolygon geom goes here',4326),position)
ORDER BY userid, timestamp desc
and the problem is my multipolygon include VERY large polygons (600 pages long in word doc!) and it took more than 2 hours to execute!
Is there a way to optimize my query or use another way?
Please your help is greatly appreciated!
No comments:
Post a Comment