Search Postgresql Archives

Bulk load data from one table to another

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux