Re: pg_dump is O(N) in DB table count N even if dumping only one table

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: pg_dump is O(N) in DB table count N even if dumping only one table
Дата
Msg-id 20130610140843.GA5680@awork2.anarazel.de
обсуждение исходный текст
Ответ на pg_dump is O(N) in DB table count N even if dumping only one table  (Gunnlaugur Thor Briem <gunnlaugur@gmail.com>)
Ответы Re: pg_dump is O(N) in DB table count N even if dumping only one table  (Gunnlaugur Thor Briem <gunnlaugur@gmail.com>)
Список pgsql-bugs
On 2013-06-10 13:28:32 +0000, Gunnlaugur Thor Briem wrote:
> Hi,
>
> pg_dump takes O(N) time dumping just one table (or a few) explicitly
> specified with a -t parameter. It thus becomes painfully slow on a database
> with very many tables.
>
> (The use case is copying a few tables over to a test DB, from a large
> production data warehouse.)
>
> The three queries taking O(N) time are listed below. AFAICT each of these
> queries could be filtered by table name/OID, at least when the number of
> tables matching the -t parameters is small, allowing pg_dump to complete in
> seconds rather than minutes.

Which of those queries take how long in your case?

E.g. I could imagine that the first two can be sped up a bit without
changing the result. E.g. not calling pg_tablespace_location() for every
relation and such.

Greetings,

Andres Freund

--
 Andres Freund                       http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump is O(N) in DB table count N even if dumping only one table
Следующее
От: Gunnlaugur Thor Briem
Дата:
Сообщение: Re: pg_dump is O(N) in DB table count N even if dumping only one table