We are moving an application from Oracle 8i to Postgres and I've run into a problem attempting to duplicate a feature
wecurrently use.
In Oracle you can divide a table into partitions. We use this feature to break up the data by month. Each month we
storeseveral tens of millions of rows in a particular table, and each month we drop the partition that's a year old. In
otherwords, we always keep the last 12 months of data (12 partitions). This is clean and fast. Since the partition is
bya timestamp column, it also gives us a certain amount of automatic indexing.
Postgres doesn't support table partitions (correct me if I'm wrong!) so the only option appears to be to dump
everythinginto one big table. What I'm worried about is the purging of the data from 12 months ago ... I'm worried that
thiswill be a slow and expensive operation.
Does anyone have any advice for how best to handle this?
Thanks in advance,
-Roger