[postgis-users] Large Databases

Jim C. Nasby jnasby at pervasive.com
Fri Jun 9 13:55:45 PDT 2006


On Fri, Jun 09, 2006 at 02:06:34PM -0600, Graham Stewart wrote:
> How will the partitioning work with spatial queries? If I partition by
> state and then try to select some data which straddles state boundaries
> will I have to explicitly pass in those states?

Well, you'll need to provide something in the WHERE clause that tells
the planner what partitions it can eliminate if you're going to get much
benefit; which means passing in the state(s) you're looking for data in.

Another possibility would be to partition based on lat/long. That way,
if you know the boundaries of the area you want to search in, you can
put that info into the WHERE clause. One caveat is that I don't know if
you can use the PostGIS extensions for defining partitions; you might
have to handle lat/long by hand.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby at pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



More information about the postgis-users mailing list