[postgis-users] PostGIS - server side optimization
pramsey at refractions.net
Wed Jan 5 09:32:13 PST 2005
Ralph is correct, this is a data organization problem.
If you want a fast hack though, you could try this.
Create an "area" attribute (or "length") and populate it with an update.
select primary_key, AsText(geom) AS geometry
WHERE geom && GeometryFromText('yourbox')
ORDER BY area
Jordi Ferran wrote:
> SELECT primary_key, AsText(geom) AS geometry
> FROM "city-1_table"
> WHERE ( geom @ GeometryFromText('BOX3D(414758.439692
> 4596794.509,421338.876 4604365.807929513)', -1) )
More information about the postgis-users