pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve Atkins <steve@blighty.com>
To: pgsql-performance@postgresql.org
Subject: Re: Data Warehouse Reevaluation - MySQL vs Postgres -- merge tables
Date: Tue, 14 Sep 2004 22:10:04 -0700
Message-ID: <20040915051003.GA32043@gp.word-to-the-wise.com> (raw)
In-Reply-To: <20040914223333.GL56059@decibel.org>
References: <m3acvulx5f.fsf@wolfe.cbbrowne.com>
	<NOEFLCFHBPDAFHEIPGBOCEFPCEAA.simon@2ndquadrant.com>
	<20040914223333.GL56059@decibel.org>

On Tue, Sep 14, 2004 at 05:33:33PM -0500, Jim C. Nasby wrote:
> On Mon, Sep 13, 2004 at 11:07:35PM +0100, Simon Riggs wrote:
> > PostgreSQL's functionality is in many ways similar to Oracle Partitioning.
> > 
> > Loading up your data in many similar tables, then creating a view like:
> > 
> > CREATE VIEW BIGTABLE (idate, col1, col2, col3...) AS
> > SELECT 200409130800, col1, col2, col3... FROM table200409130800
> > UNION ALL
> > SELECT 200409131000, col1, col2, col3... FROM table200409131000
> > UNION ALL
> > SELECT 200409131200, col1, col2, col3... FROM table200409131200
> > ...etc...
[...]
> 
> Is there by any chance a set of functions to manage adding and removing
> partitions? Certainly this can be done by hand, but having a set of
> tools would make life much easier. I just looked but didn't see anything
> on GBorg.

I've done a similar thing with time-segregated data by inheriting
all the partition tables from an (empty) parent table.

Adding a new partition is just a "create table tablefoo () inherits(bigtable)"
and removing a partition just "drop table tablefoo".

Cheers,
  Steve




view thread (52+ messages)  latest in thread

Message-ID: <20040915051003.GA32043@gp.word-to-the-wise.com>
Permalink:  ../20040915051003.GA32043@gp.word-to-the-wise.com/
Also on:    postgresql.org/message-id/20040915051003.GA32043@gp.word-to-the-wise.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: steve@blighty.com
  Subject: Re: Data Warehouse Reevaluation - MySQL vs Postgres -- merge tables
  In-Reply-To: <20040915051003.GA32043@gp.word-to-the-wise.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox