pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim C. Nasby <decibel@decibel.org>
To: Y Sidhu <ysidhu@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Simulate database fragmentation
Date: Sun, 27 May 2007 11:05:38 -0500
Message-ID: <20070527160538.GO92628@nasby.net> (raw)
In-Reply-To: <b09064f30705231158r517e4111kaedfa7c0f84b6a51@mail.gmail.com>
References: <b09064f30705231158r517e4111kaedfa7c0f84b6a51@mail.gmail.com>

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.
-- 
Jim Nasby                                      decibel@decibel.org
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)

view thread (2+ messages)

Message-ID: <20070527160538.GO92628@nasby.net>
Permalink:  ../20070527160538.GO92628@nasby.net/
Also on:    postgresql.org/message-id/20070527160538.GO92628@nasby.net

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: decibel@decibel.org, ysidhu@gmail.com
  Subject: Re: Simulate database fragmentation
  In-Reply-To: <20070527160538.GO92628@nasby.net>
  References: <b09064f30705231158r517e4111kaedfa7c0f84b6a51@mail.gmail.com> <20070527160538.GO92628@nasby.net>

* 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