title: Archive old data in Postgresql
body: <p>I'm currently expecting for somebody to advice me on the process which I'm gonna take forward for DB archiving.</p>
  
  <p>I've database (DB-1) which has 2 very large tables, one table having 25 GB of data and another is 20 GB of data. Which cause major performance issues even I have indexes.</p>
  
  <p>So, we considered to archive the old data with the below process, </p>
  
  <ol>
  <li>Clone a new database (DB-2) from existing database (DB-1).</li>
  <li>Delete the old data from DB-1, so it will have only the last 2 years records. In case If I need old data can connect DB-2.</li>
  <li>Every month should move an old data from DB-1 to DB-2, and delete the moved rows from DB-1.</li>
  </ol>