Re: pg_restore takes ages

Поиск
Список
Период
Сортировка
От Shridhar Daithankar
Тема Re: pg_restore takes ages
Дата
Msg-id 3F7D3393.8020608@persistent.co.in
обсуждение исходный текст
Ответ на pg_restore takes ages  (Alex <alex@meerkatsoft.com>)
Список pgsql-general
Alex wrote:

> Hi,
> I use pg_restore to load a previously dumped database.  (10mil records).
> the load of the data runs quite fast but when starting creating the
> triggers for foreign keys it takes forever.
>
> Isnt there are a faster way. after all the triggers in the source db
> already made sure the data was clean.

You can try creating index/triggers first and load the data. At the end it will
take a while before you get a usable database with either approach but see what
works faster for you.

Personally I was in a situation where postgresql was hogging space while
creating index on a table that had 81M rows with 3GB disk footprint. I dropped
the table and recreated it. Also created index before loading data. The loading
was slow with this approach but it finished in 3 hours. And I had an updated
index as well. Just had to run vacuum over it.

Take your pick..

  Shridhar



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

Предыдущее
От: "Robert Wille"
Дата:
Сообщение: LC_COLLATE=C not working
Следующее
От: Peter Childs
Дата:
Сообщение: Re: Type of application that use PostgreSQL