Re: Monthly table partitioning for fast purges?

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: PgSQL General ML <pgsql-general(at)postgresql(dot)org>
Subject: Re: Monthly table partitioning for fast purges?
Date: 2003-08-03 22:49:54
Message-ID: 1059950993.28344.48.camel@haggis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, 2003-08-03 at 06:31, Shridhar Daithankar wrote:
> On 1 Aug 2003 at 13:46, Roger Hand wrote:
[snip]
> Here is what you can do.
>
> * Create a empty base table.
> * Create a trigger the directs the select on timestamps accordingly
> * Write a schedule to create a new table at the start of every month and update
> the trigger accordingly
> * Create and maintain rules to insert into base table depending upon the
> timestamp.
>
> This is just a rough idea.
>
> There might be fair amount of work to get this working but surely it is not
> imposible.

And you get a big performance hit when all those records are moved.

Partitioning "should" be put on the TODO list soon after tablespaces
(or DBA-defined directories) is implemented.

--
+-----------------------------------------------------------------+
| Ron Johnson, Jr. Home: ron(dot)l(dot)johnson(at)cox(dot)net |
| Jefferson, LA USA |
| |
| "I'm not a vegetarian because I love animals, I'm a vegetarian |
| because I hate vegetables!" |
| unknown |
+-----------------------------------------------------------------+

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2003-08-03 23:47:25 Re: COPY and double-quote-separated fields
Previous Message Tom Lane 2003-08-03 22:28:04 Re: like performance w/o wildcards.