Re: [GENERAL] Performance on multiple OR conditions inside ()

2011-01-14 Thread Håvard Wahl Kongsgård
This alternative was a little faster and does not return duplicated rows. It will take 41 hours on my system, but it will have to do for now. SELECT vciia_main.sitrp,vciia_main.date_time,ST_AsText(vciia_main.geom) from vciia_main, south_vietnam72 where st_within(vciia_main.geom, south_vietnam72.ge

Re: [GENERAL] Performance on multiple OR conditions inside ()

2011-01-13 Thread Nicklas Avén
No, the order is not supposed to make any difference. The planner plans the query from costs and statistics and shouldn't care about the order (I think) What you should do is to divide the big geometries and build new index. That can be done by building a grid with generate_series and cutting th

Re: [GENERAL] Performance on multiple OR conditions inside ()

2011-01-13 Thread Håvard Wahl Kongsgård
Hi, so one solution is to use the most common feature first (), in this case the houses ? |What version of PostGIS are you using? 1.5.1 2011/1/13 Nicklas Avén > Hallo Håvard > > The planner is supposed to take care of that. It estimates ehat is the > cheapest part of the OR statements and che

[GENERAL] Performance on multiple OR conditions inside ()

2011-01-13 Thread Håvard Wahl Kongsgård
Hi, I have a spatial query with multiple OR statements, for large tables it's very slow. Is it possible to skip the spatial lookup on the other conditions if first(previous) condition equal 1, and thereby increase the performance? SELECT vciia_main.sitrp,vciia_main.date_time from vciia_main, south