Re: [NOVICE] How to split a table?

From: Christoph Frick <frick(at)sc-networks(dot)com>
To: Felix Zhang <felix(dot)zhang(dot)2005(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] How to split a table?
Date: 2006-10-17 09:26:16
Message-ID: 20061017092616.GH3822@byleth.sc-networks.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice pgsql-sql

On Tue, Oct 17, 2006 at 03:39:21PM +0800, Felix Zhang wrote:

> I want to split a table to 2 small tables. The 1st one contains 60%
> records which are randomly selected from the source table. How to do
> it?

i do my A/B-Group splitting usually by &1 the serial of the table.
assuming, that there are no irregularities in the process of creating
your entries, this should give a 50/50 split, which is reuseable for
future things and there never is a intersection of the two groups.

--
cu

In response to

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2006-10-17 09:36:35 Re: Any documatation about porting from Oracle to PostgreSQL
Previous Message Gregory S. Williamson 2006-10-17 09:19:47 Re: [SQL] [GENERAL] How to split a table?

Browse pgsql-novice by date

  From Date Subject
Next Message A. Kretschmer 2006-10-17 09:36:35 Re: Any documatation about porting from Oracle to PostgreSQL
Previous Message Gregory S. Williamson 2006-10-17 09:19:47 Re: [SQL] [GENERAL] How to split a table?

Browse pgsql-sql by date

  From Date Subject
Next Message A. Kretschmer 2006-10-17 09:36:35 Re: Any documatation about porting from Oracle to PostgreSQL
Previous Message Gregory S. Williamson 2006-10-17 09:19:47 Re: [SQL] [GENERAL] How to split a table?