pgsql: Use binary search instead of brute-force scan in findNamespace()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Use binary search instead of brute-force scan in findNamespace()
Дата
Msg-id E1SXzNM-0007Be-Qb@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Use binary search instead of brute-force scan in findNamespace().

The previous coding presented a significant bottleneck when dumping
databases containing many thousands of schemas, since the total time
spent searching would increase roughly as O(N^2) in the number of objects.
Noted by Jeff Janes, though I rewrote his proposed patch to use the
existing findObjectByOid infrastructure.

Since this is a longstanding performance bug, backpatch to all supported
versions.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/73cc7d3b240e1d46b1996382e5735a820f8bc3f7

Modified Files
--------------
src/bin/pg_dump/common.c  |   18 ++++++++++++++++--
src/bin/pg_dump/pg_dump.c |   35 ++++++++++++++---------------------
src/bin/pg_dump/pg_dump.h |    1 +
3 files changed, 31 insertions(+), 23 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Use binary search instead of brute-force scan in findNamespace()
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Use binary search instead of brute-force scan in findNamespace()