Re: add column with default value is very slow

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: AI Rumman <rummandba(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: add column with default value is very slow
Date: 2012-09-11 14:05:54
Message-ID: 20120911140554.GA8922@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Sep 11, 2012 at 08:04:06PM +0600, AI Rumman wrote:
> Table size is 1186 MB.

if it takes long, it just means that your IO is slow.

> I split the command in three steps as you said, but the result same during
> the update operation.

three? I was showing four steps, and one of them is usually consisting
hundreds, if not thousands, of queries.

> One more thing, I have just restored the db from dump and analyzed it and
> I am using Postgresql 9.1 with 3 GB Ram with dual core machine.

so it looks like your IO channel is slow.

Best regards,

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
http://depesz.com/

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Andrew Dunstan 2012-09-11 14:07:04 Re: add column with default value is very slow
Previous Message AI Rumman 2012-09-11 14:04:06 Re: add column with default value is very slow