[postgis-tickets] [PostGIS] #5337: Row estimate for gist geometry index is more than 500 times smaller than actual count

PostGIS trac at osgeo.org
Tue Feb 14 00:03:20 PST 2023


#5337: Row estimate for gist geometry index is more than 500 times smaller than
actual count
-----------------------------+---------------------------
  Reporter:  Björn Harrtell  |      Owner:  pramsey
      Type:  defect          |     Status:  closed
  Priority:  medium          |  Milestone:  PostGIS 3.4.0
 Component:  postgis         |    Version:  3.2.x
Resolution:  invalid         |   Keywords:
-----------------------------+---------------------------
Changes (by komzpa):

 * status:  new => closed
 * resolution:   => invalid

Comment:

 Any dynamically created geometry will not be known at planning time and
 thus cannot be used in estimation.
 (st_setsrid((st_extent(geodkobjekt.geometri))::geometry, 25832)) is a
 dynamically created geometry. Typical way to deal with that is to either
 create the table really in separate query before this one instead of
 inline CTE, or to rewrite your query to be a direct JOIN on the tables
 without proxy calculations (which you can still add on top of the JOIN if
 needed).
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5337#comment:6>
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-tickets mailing list