diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-01-11 23:06:16 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-01-11 23:06:16 +0000 |
commit | 0069d7c36acea96f6c3ca7585e9e7ce1501d8d7e (patch) | |
tree | c75bdbb27f907c6a6e608581a127cf88fce6362b /src/backend/access/gist/gistutil.c | |
parent | e6be37ffe2ca736378c9c4608ee8f8b2e11189b9 (diff) | |
download | postgresql-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