diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-01-11 23:06:09 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-01-11 23:06:09 +0000 |
commit | c483632d25c4788eecf7d99fc4297864e72d19aa (patch) | |
tree | c9892a12d9e11e3a0dd851113082db7e9d1e60c4 /src/backend/executor/nodeSort.c | |
parent | 6a59778360f372ee8246f5b3cf88ff925e67db1f (diff) | |
download | postgresql-c483632d25c4788eecf7d99fc4297864e72d19aa.tar.gz postgresql-c483632d25c4788eecf7d99fc4297864e72d19aa.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/executor/nodeSort.c')
0 files changed, 0 insertions, 0 deletions