[postgis-devel] [PostGIS] #1828: Estimate returned by geography_gist_selectivity results in slow query plan for ST_DWithin

PostGIS trac at osgeo.org
Tue Jul 3 09:55:59 PDT 2012


#1828: Estimate returned by geography_gist_selectivity results in slow query plan
for ST_DWithin
---------------------------+------------------------------------------------
 Reporter:  realityexists  |       Owner:  mcayland     
     Type:  defect         |      Status:  new          
 Priority:  medium         |   Milestone:  PostGIS 2.0.2
Component:  postgis        |     Version:  2.0.x        
 Keywords:                 |  
---------------------------+------------------------------------------------

Comment(by pramsey):

 The problem is that for <const> && <const> we're returning
 DEFAULT_SELECTIVITY, which is very high. So the <const> && <const> term is
 washing out the other one, the one we care about. As the comment in the
 code block notes, the <const> && <const> case should return either 0 or 1,
 depending on the actual evaluation of the statement, but not something in
 between. I'm wondering if returning 1 might actually be the path of "less
 harm" in a temporary hack, rather than returning DEFAULT_SELECTIVITY.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1828#comment:36>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list