From: | Marius <lonepsycho(at)gmail(dot)com> |
---|---|
To: | "drum(dot)lucas(at)gmail(dot)com" <drum(dot)lucas(at)gmail(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Table size - optimization |
Date: | 2015-12-14 11:24:48 |
Message-ID: | 566ea6cb.46b71c0a.17f65.5010@mx.google.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
You could simply rename old table, create new one and all in same transaction. No data move required.
-----Original Message-----
From: drum(dot)lucas(at)gmail(dot)com
Sent: 2015.12.14 06:37
To: pgsql-admin(at)postgresql(dot)org
Subject: [ADMIN] Table size - optimization
Feedlog is a central area where theres been a lot of data dumped together and the beast has grown.
Whats a better way to design the db table(s) for feedlog so we can get a very large performance gain.
Is there a way we can create a feedlog-history table or yearly tables eg feedlog-2014 and move old data out of the original table so its a kean fast table?
What code would need to change to deal with that?
Some data :
Size: 8 GB
relname | relkind | reltuples | relpages
-------------------+---------+-------------+----------
feedlog | r | 6.60508e+07 | 9974857
Thanks,
Lucas
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Anderson | 2015-12-15 13:05:10 | [REASSIGN confusion] |
Previous Message | Shreeyansh Dba | 2015-12-14 09:01:29 | Re: Oracle to Postgres Migration - Duplicate Key Issue |