Re: [GENERAL] efficiently migrating 'old' data from one table toanother - Mailing list pgsql-general

From John R Pierce
Subject Re: [GENERAL] efficiently migrating 'old' data from one table toanother
Date
Msg-id 13ea0eea-08e5-2917-20bd-ef85532663c2@hogranch.com
Whole thread Raw
In response to [GENERAL] efficiently migrating 'old' data from one table to another  (Jonathan Vanasco <postgres@2xlp.com>)
List pgsql-general
On 1/12/2017 12:06 PM, Jonathan Vanasco wrote:
> I'm just wondering if there's a more efficient way of handling a certain periodic data migration.

partition the tables by some date interval such as week (if you do this
archiving weekly).   each week, disconnect the oldest partition from the
'active' partition set, and add it to the 'archive' partition set.
voila, no inserts, deletes, or updates are done at all, just some
metadata operations.


--
john r pierce, recycling bits in santa cruz



pgsql-general by date:

Previous
From: "btober@computer.org"
Date:
Subject: Re: [GENERAL] efficiently migrating 'old' data from one table toanother
Next
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] efficiently migrating 'old' data from one table toanother