Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id D82449FB408 for ; Sun, 27 May 2007 13:05:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 94852-03 for ; Sun, 27 May 2007 13:05:40 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 261E99FB3E1 for ; Sun, 27 May 2007 13:05:40 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 090C656457; Sun, 27 May 2007 11:05:40 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Sun, 27 May 2007 11:05:38 -0500 Date: Sun, 27 May 2007 11:05:38 -0500 From: "Jim C. Nasby" To: Y Sidhu Cc: pgsql-performance@postgresql.org Subject: Re: Simulate database fragmentation Message-ID: <20070527160538.GO92628@nasby.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yhze8HlyfmXt1APY" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 6.1-RELEASE-p10 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.13 (2006-08-11) X-Hashcash: 1:20:070527:ysidhu@gmail.com::OL3Y/BWR6LZNTg5X:03MXj X-Hashcash: 1:20:070527:pgsql-performance@postgresql.org::TrreHv/K51/7v23u:00000 0000000000000000000000005gVK X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/561 X-Sequence-Number: 24951 --yhze8HlyfmXt1APY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 23, 2007 at 11:58:06AM -0700, Y Sidhu wrote: > Is there any easy way to take a database and add/delete records to create > fragmentation of the records and indexes. I am trying to recreate high > vacuum times. Update random rows, then do a vacuum. That will result in free space in random locations. At that point you'd probably want to update some ranges of rows, enough so that they get forced to new pages. A better idea might be to just insert random data. --=20 Jim Nasby decibel@decibel.org EnterpriseDB http://enterprisedb.com 512.569.9461 (cell) --yhze8HlyfmXt1APY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (FreeBSD) iD8DBQFGWaxSdO30qud8SkgRAi77AJ9YQK3hF5KqbS0DciXxxQNKGW5b7QCfbpsn 7zx23/QVe8AZwYuU8iHDGfg= =Fb4m -----END PGP SIGNATURE----- --yhze8HlyfmXt1APY--