aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistutil.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-01-11 23:06:16 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-01-11 23:06:16 +0000
commit0069d7c36acea96f6c3ca7585e9e7ce1501d8d7e (patch)
treec75bdbb27f907c6a6e608581a127cf88fce6362b /src/backend/access/gist/gistutil.c
parente6be37ffe2ca736378c9c4608ee8f8b2e11189b9 (diff)
downloadpostgresql-0069d7c36acea96f6c3ca7585e9e7ce1501d8d7e.tar.gz
postgresql-0069d7c36acea96f6c3ca7585e9e7ce1501d8d7e.zip
Fix a performance problem in databases with large numbers of tables
(or other types of pg_class entry): the function pgstat_vacuum_tabstat, invoked during VACUUM startup, had runtime proportional to the number of stats table entries times the number of pg_class rows; in other words O(N^2) if the stats collector's information is reasonably complete. Replace list searching with a hash table to bring it back to O(N) behavior. Per report from kim at myemma.com. Back-patch as far as 8.1; 8.0 and before use different coding here.
Diffstat (limited to 'src/backend/access/gist/gistutil.c')
0 files changed, 0 insertions, 0 deletions