Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id BAD499FB2F5; Tue, 17 Oct 2006 06:47:36 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 02608-08; Tue, 17 Oct 2006 06:47:32 -0300 (ADT) X-Greylist: delayed 00:21:12.215968 by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 40A6B9FB347; Tue, 17 Oct 2006 06:47:32 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mail.sc-networks.de (www.sc-networks.de [62.128.28.138]) by svr4.postgresql.org (Postfix) with ESMTP id 5D00C5AF8FA; Tue, 17 Oct 2006 09:26:16 +0000 (GMT) Received: from frick by mail.sc-networks.de with local (Exim 4.10) id 1GZlDE-0004KI-00; Tue, 17 Oct 2006 11:26:16 +0200 Date: Tue, 17 Oct 2006 11:26:16 +0200 From: Christoph Frick To: Felix Zhang Cc: pgsql-sql@postgresql.org, pgsql-general@postgresql.org, pgsql-novice@postgresql.org Subject: Re: [NOVICE] How to split a table? Message-ID: <20061017092616.GH3822@byleth.sc-networks.de> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HuscSE0D68UGttcd" Content-Disposition: inline In-Reply-To: X-GPG-PUBLICKEY: http://www.sc-networks.com/gpgkeys/frick-2004-02-16.asc X-GPG-FINGERPRINT: 1024D/34AEA0DD 3DA7 817F F3D7 A21A FAB4 4AFC 38EF 62E9 34AE A0DD X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200610/799 X-Sequence-Number: 102325 --HuscSE0D68UGttcd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. --=20 cu --HuscSE0D68UGttcd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkU0obgACgkQOO9i6TSuoN29vwCghOJQve/WQpcrArZv6AnEB6e4 LKMAnRPAYGlR7J39m2B0nM8xXpyfNVwv =mLvR -----END PGP SIGNATURE----- --HuscSE0D68UGttcd--