[postgis-devel] [PostGIS] #230: Put in costs in _ST and possibly other functions

PostGIS trac at osgeo.org
Sun Aug 9 10:03:54 PDT 2009

#230: Put in costs in _ST and possibly other functions
  Reporter:  nicklas  |       Owner:  robe                     
      Type:  defect   |      Status:  assigned                 
  Priority:  medium   |   Milestone:  postgis 1.5.0            
 Component:  postgis  |     Version:  1.4                      
Resolution:           |    Keywords:  st_dwithin st_expand bbox
Comment (by nicklas):

 OK, I see

 cost 1 in postgresql 8.3 and 8.4 is just default values.
 From what comes cost 1 in 8.3, 8.4 installations, it is not mentioned in

 Couldn't we put the costs in a separate sql-file with every function
 represented like:
 ALTER FUNCTION _ST_DWithin(geometry,geometry,float8) cost 100;

 I can see some advantages of that.[[BR]]

 1) in installation just one check for postgresql version and if 8.3 or
 above --> run costs.sql after postgis.sql [[BR]]
 2) users could easily move customized costs from one installation to
 3) we could put new recommended costs in the wiki for example, between

 Espescially in the beginning I guess there will be some calibration in the
 recommended costs. 2 and 3 above is of course not depending on that we
 distribute costs.sql in the installation, but then the user have one place
 to play with the costs and a recommended way of storing the customizing by
 editing the costs.sql.

 Wouldn't it be easier too, to try something like Kevin suggesting of
 getting costs from statistics if they where held separately.


Ticket URL: <http://trac.osgeo.org/postgis/ticket/230#comment:17>
PostGIS <http://trac.osgeo.org/postgis/>

More information about the postgis-devel mailing list