[postgis-devel] [PostGIS] #2075: Incorrect row count estimation for 3D index

PostGIS trac at osgeo.org
Fri Nov 2 06:45:48 PDT 2012


#2075: Incorrect row count estimation for 3D index
----------------------+-----------------------------------------------------
 Reporter:  olegmyrk  |       Owner:  pramsey      
     Type:  defect    |      Status:  new          
 Priority:  medium    |   Milestone:  PostGIS 2.0.2
Component:  postgis   |     Version:  2.0.x        
 Keywords:            |  
----------------------+-----------------------------------------------------
 I have a problem that Postgis 3D spatial indexes (built using
 gist_geometry_ops_nd) do not estimate index lookup row count
 properly,unlike 2D spatial indexes which are working OK.

 The 2D query is something like:
   position && ST_GeomFromText('LINESTRING(-180 -90, 180 90)', 4326)
 And 3D query is something like:
   position &&& ST_GeomFromText('LINESTRING(-180 -90 0, 180 90
 10000000000)', 4326)

 In case of 2D query, query planner gives realistic row count estimates.
 In case of 3D, the result set is always estimated to be 0.1% of rows.

 As a result of incorrect 3D query row estimation, query planner always
 thinks that spatial query is highly selective and ignores other indexes it
 might have used otherwise.

 Is this a bug or am I missing something? I am using Postgis 2.0.1 on
 Postgresql 9.1

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