[postgis-tickets] [PostGIS] #5337: Row estimate for gist geometry index is more than 500 times smaller than actual count
PostGIS
trac at osgeo.org
Mon Feb 13 15:26:55 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: new
Priority: medium | Milestone: PostGIS 3.4.0
Component: postgis | Version: 3.2.x
Keywords: |
----------------------------+---------------------------
I have a table that contains ~30 million mixed geometries of points,
linestrings and polygons, mostly small but some few exceptions that are
large. Data is not uniformly distributed.
Counting rows within a small bbox (~5% of full extent) where real density
is high results in 1.552.761 rows. Row estimate when looking at the
explained plan is 2.819.
The table is recently analyzed and I've attempted to adjust with set
statistics on the geometry column to 1000 instead of default 100 hoping
that could improve the estimate but it has little to no effect.
Data is open at https://datafordeler.dk/dataoversigt/geodanmark-vektor
/geodanmark-vektor-brugerdefineret-filudtraek/ but unfortunately it is in
Danish only (I think?) and requires a cumbersome process to register and
download. I might be able to provide a table copy if anyone is interested
to look into this issue.
postgis_full_version:
POSTGIS="3.2.3 0" [EXTENSION] PGSQL="130" GEOS="3.9.2-CAPI-1.14.3"
PROJ="9.0.1" LIBXML="2.9.4" LIBJSON="0.12.1" LIBPROTOBUF="1.2.1"
WAGYU="0.5.0 (Internal)" (core procs from "3.1.1 aaf4c79" need upgrade)
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5337>
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