[postgis-devel] [PostGIS] #1828: Estimate returned by geography_gist_selectivity results in slow query plan for ST_DWithin
PostGIS
trac at osgeo.org
Fri Jun 15 11:11:34 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.1
Component: postgis | Version: 2.0.x
Keywords: |
---------------------------+------------------------------------------------
Comment(by strk):
And now for geography:
{{{
strk=# SELECT count(id) FROM _test_pos WHERE ST_DWithin(pos, 'POINT(7 7)',
300000);
NOTICE: [geography_estimate.c:geography_gist_selectivity:464]
geography_gist_selectivity called
NOTICE: [geography_estimate.c:estimate_selectivity:163] histogram has 12
unitsx, 34 unitsy, 36 unitsz
NOTICE: [geography_estimate.c:estimate_selectivity:164] histogram
geosize is 0.116978x0.321376x0.342003
NOTICE: [geography_estimate.c:estimate_selectivity:401] search_box
overlaps 1.000000 cells
NOTICE: [geography_estimate.c:estimate_selectivity:402] avg feat
overlaps 1.000000 cells
NOTICE: [geography_estimate.c:estimate_selectivity:414]
SUM(ov_histo_cells)=0.000000
NOTICE: [geography_estimate.c:estimate_selectivity:415] gain=1.000000
NOTICE: [geography_estimate.c:estimate_selectivity:416]
selectivity=0.000000
NOTICE: [geography_estimate.c:geography_gist_selectivity:572] returning
computed value: 0.000000
NOTICE: [geography_estimate.c:geography_gist_selectivity:464]
geography_gist_selectivity called
NOTICE: [geography_estimate.c:geography_gist_selectivity:507] no
variable argument ? - returning default selectivity
count
-------
3839
(1 row)
}}}
The "search_box overlaps 1 cells" is suspicius, isn't it ?
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1828#comment:19>
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