[postgis-devel] [PostGIS] #230: st_expand seems to affect the execution order wich affects st_dwithin

PostGIS trac at osgeo.org
Wed Aug 5 06:55:43 PDT 2009


#230: st_expand seems to affect the execution order wich affects st_dwithin
----------------------+-----------------------------------------------------
  Reporter:  nicklas  |       Owner:  robe                     
      Type:  defect   |      Status:  assigned                 
  Priority:  medium   |   Milestone:  postgis 1.4.1            
 Component:  postgis  |     Version:  1.4                      
Resolution:           |    Keywords:  st_dwithin st_expand bbox
----------------------+-----------------------------------------------------
Comment (by robe):

 Exactly observe ( that part is coming from ST_DWithin -- if you look at
 the definition of ST_DWithin -- it has 2 expand calls - this is one of
 them)

  "        Index Cond: (a.the_geom && st_expand(b.the_geom, 0::double
  precision))"
  "        Filter: ((a.state)::text <> 'Hawaii'::text)

 The join filter part has the portion of ST_DWithin that doesn't use an
 index (see how the second expand that is pushed to index is missing)

 "  Join Filter: ((b.the_geom && st_expand(a.the_geom, 0::double
  precision)) AND _st_dwithin(a.the_geom, b.the_geom, 0::double
 precision))"


 The planner has split the function into its constituent parts.  So lesson
 learned putting cost on transparent SQL functions that use others is not
 effective.

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


More information about the postgis-devel mailing list