[postgis-users] ST_Contains() performance problem

Kevin Neufeld kneufeld at refractions.net
Sat Apr 26 19:32:33 PDT 2008


Paragon Corporation wrote:
> I personally think we should raise the costs for all postgis functions since
> all postgis functions are definitely more costly than standard other
> functions.  
>
>   
I agree.  Also, rather than just assigning a value > 1, I would suggest 
we try to gather some stats about every function and set the cost 
appropriately.  (IE, it's far more expensive to compute ST_Contains or 
ST_Intersects than ST_GeometryType or ST_PointN).  Maybe we could come 
up with a cost estimate matrix and assign functions an appropriate cost 
based on their average run time.  Of course even that's anyone's best 
guess since averages are totally dependent on a individual's dataset ... 
but it'd be a start.

-- Kevin



More information about the postgis-users mailing list