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

PostGIS trac at osgeo.org
Thu May 17 06:33:35 PDT 2012


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

Comment(by pramsey):

 Yeah, this is good though, the point is not the speed, it's the bad
 estimate. The spatial stuff comes up fast enough, but because the estimate
 is bad, it lands in the middle of a bad plan which is itself very slow.
 Your explain shows the behavior we need to diagnose: estimated number of
 rows is 1, actual rows is 5118. Can you provide the table you are running
 this SQL against? (And further, cut down the query so it doesn't use a
 function anymore but still displays the bad estimate?)

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1828#comment:7>
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