[postgis-tickets] [PostGIS] #2998: Define a strategy to ensure stats are collected during topology building
PostGIS
trac at osgeo.org
Thu Nov 20 04:02:10 PST 2014
#2998: Define a strategy to ensure stats are collected during topology building
-------------------------+--------------------------------------------------
Reporter: strk | Owner: strk
Type: enhancement | Status: new
Priority: medium | Milestone: PostGIS Future
Component: topology | Version: trunk
Keywords: |
-------------------------+--------------------------------------------------
Comment(by strk):
Note that it is not necessarely true that indexes won't be used due to
lack of stats, as the estimator makes some guesses on itself, and the
invoked type-specific selectivity estimators may also behave in unexpected
ways.
In this example, passing 99 geometries to toTopoGeom in a single statement
resulted in these operations on the "edge_data" table:
{{{
=# select * from pg_stat_all_tables where relname = 'edge_data' and
schemaname = 'topo_ulfareale';
relid | 16228229
schemaname | topo_ulfareale
relname | edge_data
seq_scan | 417
seq_tup_read | 28976
idx_scan | 3438
idx_tup_fetch | 3170
n_tup_ins | 175
n_tup_upd | 365
n_tup_del | 0
n_tup_hot_upd | 65
n_live_tup | 175
n_dead_tup | 365
last_vacuum |
last_autovacuum |
last_analyze |
last_autoanalyze |
vacuum_count | 0
autovacuum_count | 0
analyze_count | 0
autoanalyze_count | 0
}}}
As you can see there was no analyze ever run, still there have been ~3.5k
index scans and "only" 417 sequencial scans. For just 99 inputs it's much
over too many scans in general, but shows that index scans still happen.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2998#comment:2>
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