Jim --

Can we see the SQL and table/index defintions (or something close, anyway) ? 
The limit won't help much if the database has to process all x-thousand tuples 
before deciding it has the number needed. Are you using an "order by" clause ?

If you can run the query in an EXPLAIN ANALYZE statement (wrap it in a 
transaction and roll it back when done if it does any updates etc. that you 
don't want to keep) ... this will take longer than the regular evaluation 
because of the timing calls but gives useful information about what the planner 
is doing.

HTH,

Greg Williamson





________________________________
From: Jim Jim <[email protected]>
To: [email protected]
Sent: Tuesday, April 14, 2009 2:00:29 AM
Subject: [postgis-users] Too many results

 Hello,

I have a table with 2d points and lines. My query is a rectangle and a line. 
The problem is there are too many results to the point where it becomes 
non-practical to wait. So I wanted to limit the results. I know that this can 
be done by LIMIT N, however, this does not stop searching after finding N 
results and the whole point is not to wait too long.

Do you have any ideas on how this could be accomplished? I suppose when it 
comes to intersections and geometrical problems this is quite important.

Thank you!

________________________________
Get the New Internet Explore 8 Optimised for MSN. Download Now


      
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to