Re: Disk Performance Problem on Large DB

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Samuel Stearns <SStearns(at)internode(dot)com(dot)au>
Cc: Jonathan Hoover <jhoover(at)yahoo-inc(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>, Kenneth Marshall <ktm(at)rice(dot)edu>
Subject: Re: Disk Performance Problem on Large DB
Date: 2010-11-05 03:41:58
Message-ID: AANLkTimVtt+XP9+-bLtLzg2WDz+BZrDjXMrpA7GTn3k+@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Nov 4, 2010 at 9:33 PM, Samuel Stearns
<SStearns(at)internode(dot)com(dot)au> wrote:
> TRUNCATE doesn't generate any rollback data, which makes it lightning fast. It just de-allocates the data pages used by the table.

Also truncate, like nearly everything in pgsql, can be rolled back. I
still remember showing my oracle co-dbas in my last job freak out when
I showed them things like

begin;
update table yada...
truncate table;
rollback;

or
begin;
drop index xyz;
explain select ...
rollback;

transactable everything is pretty cool. (note database and tablespace
craete / drop are the only things that aren't transactable, which
makes some sense.)

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Samuel Stearns 2010-11-05 03:44:57 Re: Disk Performance Problem on Large DB
Previous Message Samuel Stearns 2010-11-05 03:40:33 Re: Disk Performance Problem on Large DB