pgsql: Fix a performance problem in databases with large numbers of

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Fix a performance problem in databases with large numbers of
Дата
Msg-id 20070111230603.65CEE9FA31C@postgresql.org
обсуждение исходный текст
Список 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.

Modified Files:
--------------
    pgsql/src/backend/postmaster:
        pgstat.c (r1.142 -> r1.143)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c.diff?r1=1.142&r2=1.143)

В списке pgsql-committers по дате отправления:

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix a performance problem in databases with large numbers of
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix a performance problem in databases with large numbers of