diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-01-11 23:06:03 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-01-11 23:06:03 +0000 |
commit | 97903c3d94b6d6ce089c90c34c1000653007b020 (patch) | |
tree | aa66b9f7378915d6744a71378068cc4774295b29 /src/interfaces/ecpg/test/expected/sql-array.c | |
parent | 87f6d64149bbd1f0ae129f20576efbda4503c521 (diff) | |
download | postgresql-97903c3d94b6d6ce089c90c34c1000653007b020.tar.gz postgresql-97903c3d94b6d6ce089c90c34c1000653007b020.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/interfaces/ecpg/test/expected/sql-array.c')
0 files changed, 0 insertions, 0 deletions