<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'>Hi List,<br>I've got a database of about 60 million spatial features that I need to run through a process.<br><br>The process can't do all of them at once, so I want to get the data from postgis in spatial chunks of up to say 500,000 features per query.<br><br>The data itself isn't evenly spatially distributed, so gridding won't work either, and  I don't see any prospectively useful functions in the reference.<br><br>Non-spatially this would be simple:<br><br>    <i>SELECT * FROM my_table ORDER BY some_key ASC LIMIT 500000 OFFSET 0</i><br>    <br>Does anyone have any suggestions for how to spatially order data with PostGIS?<br><br>Thanks,<br>Jonathan<br></div></body></html>