From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix a performance problem in databases with large numbers of |
Date: | 2007-01-11 23:06:16 |
Message-ID: | 20070111230616.EB73B9FB1C2@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
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.
Tags:
----
REL8_1_STABLE
Modified Files:
--------------
pgsql/src/backend/postmaster:
pgstat.c (r1.111.2.6 -> r1.111.2.7)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c.diff?r1=1.111.2.6&r2=1.111.2.7)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Meskes | 2007-01-12 10:00:14 | pgsql: Simplified regression handling Added patch by Joachim to work |
Previous Message | Tom Lane | 2007-01-11 23:06:09 | pgsql: Fix a performance problem in databases with large numbers of |