Bulk load data from one table to another

Поиск
Список
Период
Сортировка
От Nikola
Тема Bulk load data from one table to another
Дата
Msg-id eeaff5d2-9faa-4791-9dab-88f379c3f494@s50g2000hsb.googlegroups.com
обсуждение исходный текст
Ответы Re: Bulk load data from one table to another  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I have a partitioned table that uses monthly temporal partitions.
Every night I want to load the last 10 weeks of data into a separate
non-partitioned table.

Currently, I truncate the destination table, drop the indexes,
execute:
"INSERT INTO destination SELECT * FROM source_partition"
and recreate indexes.

This loads about 66.5 million rows into the destination table in about
1 hour. Recreating of indexes (4 of them) takes additional 2 hours. Is
there a more efficient way to perform this procedure?

Thanks.

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

Предыдущее
От: Ivan Sergio Borgonovo
Дата:
Сообщение: table "inheritance" and uniform access
Следующее
От: "Henry - Zen Search SA"
Дата:
Сообщение: Re: replication