pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Intentionally splitting data in a table across files.
7+ messages / 6 participants
[nested] [flat]

* Intentionally splitting data in a table across files.
@ 2001-06-06 14:55  Nick Fankhauser <nickf@ontko.com>
  0 siblings, 2 replies; 7+ messages in thread

From: Nick Fankhauser @ 2001-06-06 14:55 UTC (permalink / raw)
  To: pgsql-admin

Does PostgreSQL support (or some day will support) "partitioned tables"?
This is a feature currently available in oracle which allows you to
physically separate the data for a table based on values in a set of columns
and attach or remove the files from the table.

While searching for the answer in the existing Docs & Archives, I noted that
a table will be split across files automatically to deal with situations
where the required space exceeds operating system limits, so it appears that
at least part of the concept already exists, but I found nothing about a way
to organize the data into a particular file or take a file that hold part of
a table off-line without making a mess. This would be a great enhancement
for warehousing applications such as ours, where the ability take a
particular large chunk of data on & off line quickly is important.

Alternately, does anyone have an idea about how to address this need in a
different way using existing tools?

-Nick

---------------------------------------------------------------------
Nick Fankhauser

    nickf@doxpop.com  Phone 1.765.965.7363  Fax 1.765.962.9788
doxpop - Court records at your fingertips - http://www.doxpop.com/




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Intentionally splitting data in a table across files.
@ 2001-06-06 16:33  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Nick Fankhauser <nickf@ontko.com>
  1 sibling, 2 replies; 7+ messages in thread

From: Tom Lane @ 2001-06-06 16:33 UTC (permalink / raw)
  To: Nick Fankhauser <nickf@ontko.com>; +Cc: pgsql-admin

"Nick Fankhauser" <nickf@ontko.com> writes:
> Does PostgreSQL support (or some day will support) "partitioned tables"?

It's not on anyone's radar screen AFAIK.

> Alternately, does anyone have an idea about how to address this need in a
> different way using existing tools?

Make a view that's a UNION of the component tables, plus rules that
cause inserts to go into the appropriate components.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Intentionally splitting data in a table across files.  (fwd)
@ 2001-06-07 01:48  Brian McCane <bmccane@mccons.net>
  0 siblings, 0 replies; 7+ messages in thread

From: Brian McCane @ 2001-06-07 01:48 UTC (permalink / raw)
  To: pgsql-admin


On Wed, 6 Jun 2001, Tom Lane wrote:

> "Nick Fankhauser" <nickf@ontko.com> writes:
> > Does PostgreSQL support (or some day will support) "partitioned tables"?
> 
> It's not on anyone's radar screen AFAIK.
> 
> > Alternately, does anyone have an idea about how to address this need in a
> > different way using existing tools?
> 
> Make a view that's a UNION of the component tables, plus rules that
> cause inserts to go into the appropriate components.

I did a poor mans version of this (sort of) in Perl.  I had some data
which had a fairly evenly distributed field (we'll call it foo :).  'foo'
was a varchar(14) field that contained a textual timestamp (don't remember
why, but it looked like '20010606123456'). I created 10 tables
(ie. bar0, bar1, bar2, ... bar9), and then had my insert function select
which table to insert into based on the last character of 'foo'.  Since I
was receiving updates about every 7 seconds during business hours, it
worked quite well.  All of the resultant tables were of similar size.

After I created the files, I distributed them to 5 drives attached via
SCSI using symlinks (bar0 and bar5 on sd0, etc, to limit the chance of
contention).

Selecting data using a UNION view was probably possible (v7.0.3) but I
never thought to try it that way.  I never found any fast way to select
data from the resulting tables, and since the goal of this data
distribution was speed, we later scrapped the idea.  They sure looked
pretty though ;).

- brian

> 
> 			regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://www.postgresql.org/search.mpl
> 





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Intentionally splitting data in a table across files.
@ 2001-06-07 04:00  Brian Baquiran <brianb@edsamail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 7+ messages in thread

From: Brian Baquiran @ 2001-06-07 04:00 UTC (permalink / raw)
  To: pgsql-admin


"Tom Lane" <tgl@sss.pgh.pa.us> wrote in message
news:27503.991845186@sss.pgh.pa.us...
> "Nick Fankhauser" <nickf@ontko.com> writes:
> > Does PostgreSQL support (or some day will support) "partitioned tables"?
>
> It's not on anyone's radar screen AFAIK.
>
> > Alternately, does anyone have an idea about how to address this need in
a
> > different way using existing tools?
>
> Make a view that's a UNION of the component tables, plus rules that
> cause inserts to go into the appropriate components.

Tried this in 7.1.2, but it returns ERROR:  "Views on unions not
implemented."

> regards, tom lane




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Intentionally splitting data in a table across files.
@ 2001-06-11 04:26  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 7+ messages in thread

From: Bruce Momjian @ 2001-06-11 04:26 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Nick Fankhauser <nickf@ontko.com>; pgsql-admin

> "Nick Fankhauser" <nickf@ontko.com> writes:
> > Does PostgreSQL support (or some day will support) "partitioned tables"?
> 
> It's not on anyone's radar screen AFAIK.

We would need the Hubble telescope to see that one.  :-)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Re: Intentionally splitting data in a table across files.
@ 2001-06-11 15:53  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Brian Baquiran <brianb@edsamail.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2001-06-11 15:53 UTC (permalink / raw)
  To: Brian Baquiran <brianb@edsamail.com>; +Cc: pgsql-admin

"Brian Baquiran" <brianb@edsamail.com> writes:
>> Make a view that's a UNION of the component tables, plus rules that
>> cause inserts to go into the appropriate components.

> Tried this in 7.1.2, but it returns ERROR:  "Views on unions not
> implemented."

Then you are not using 7.1.2.  7.0.* I'd believe.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Intentionally splitting data in a table across files.
@ 2001-07-01 04:24  Anuradha Ratnaweera <anuradha@gnu.org>
  parent: Nick Fankhauser <nickf@ontko.com>
  1 sibling, 0 replies; 7+ messages in thread

From: Anuradha Ratnaweera @ 2001-07-01 04:24 UTC (permalink / raw)
  To: Nick Fankhauser <nickf@ontko.com>; +Cc: pgsql-admin

On Wed, Jun 06, 2001 at 09:55:55AM -0500, Nick Fankhauser wrote:
> 
> Alternately, does anyone have an idea about how to address this need in a
> different way using existing tools?

On Linux, try RAID 0. Read Software-RAID-HOWTO.

Anuradha

-- 

Debian GNU/Linux (kernel 2.4.6-pre6)

"A mind is a terrible thing to have leaking out your ears."
-- The League of Sadistic Telepaths




^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2001-07-01 04:24 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-06-06 14:55 Intentionally splitting data in a table across files. Nick Fankhauser <nickf@ontko.com>
2001-06-06 16:33 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-06-07 04:00   ` Brian Baquiran <brianb@edsamail.com>
2001-06-11 15:53     ` Tom Lane <tgl@sss.pgh.pa.us>
2001-06-11 04:26   ` Bruce Momjian <pgman@candle.pha.pa.us>
2001-07-01 04:24 ` Anuradha Ratnaweera <anuradha@gnu.org>
2001-06-07 01:48 Re: Intentionally splitting data in a table across files.  (fwd) Brian McCane <bmccane@mccons.net>

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