pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Radovan Antloga <radovan.antloga@siol.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance decrease
Date: Thu, 20 Apr 2006 11:41:41 -0400
Message-ID: <18973.1145547701@sss.pgh.pa.us> (raw)
In-Reply-To: <011b01c6648e$067ee170$1e4ba8c0@AR6>
References: <011b01c6648e$067ee170$1e4ba8c0@AR6>

"Radovan Antloga" <radovan.antloga@siol.net> writes:
> My test table has 15830 records with 190 fields.

190 fields in a table seems like rather a lot ... is that actually
representative of your intended applications?

> I do like this:

> update table
> set field = null

Again, is that representative of something you'll be doing a lot in
practice?  Most apps don't often update every row of a table, in my
experience.

> After first execute I get time 3 seconds. Then I repeat
> this update. After each update time increase. I get
> 4 sec, 7 sec, 10 sec, 12 sec, 15 sec, 18 sec, 21 sec.

There should be some increase because of the addition of dead rows,
but both the original 3 seconds and the rate of increase seem awfully
high for such a small table.  What are you running this on?

For comparison purposes, here's what I see on a full-table UPDATE
of a 10000-row table on a rather slow HP box:

regression=# \timing
Timing is on.
regression=# create table t1 as select * from tenk1;
SELECT
Time: 1274.213 ms
regression=# update t1 set unique2 = null;
UPDATE 10000
Time: 565.664 ms
regression=# update t1 set unique2 = null;
UPDATE 10000
Time: 589.839 ms
regression=# update t1 set unique2 = null;
UPDATE 10000
Time: 593.735 ms
regression=# update t1 set unique2 = null;
UPDATE 10000
Time: 615.575 ms
regression=# update t1 set unique2 = null;
UPDATE 10000
Time: 755.456 ms
regression=#

Vacuuming brings the time back down:

regression=# vacuum t1;
VACUUM
Time: 242.406 ms
regression=# update t1 set unique2 = null;
UPDATE 10000
Time: 458.028 ms
regression=#

			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <18973.1145547701@sss.pgh.pa.us>
Permalink:  ../18973.1145547701@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18973.1145547701@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, radovan.antloga@siol.net
  Subject: Re: Performance decrease
  In-Reply-To: <18973.1145547701@sss.pgh.pa.us>

* 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