pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bendik R.Johansen <bendik.johansen@gmail.com>
Cc: PostgreSQL Perform <pgsql-performance@postgresql.org>
Subject: Re: Slow update
Date: Tue, 12 Apr 2005 10:35:40 -0400
Message-ID: <15725.1113316540@sss.pgh.pa.us> (raw)
In-Reply-To: <0201deb23790cee173bdd2d3f0e96642@gmail.com>
References: <0201deb23790cee173bdd2d3f0e96642@gmail.com>

"Bendik R.Johansen" <bendik.johansen@gmail.com> writes:
> I am having a bit of trouble updating a single integer column.
> My table has around 10 columns and 260 000 records.

> update no.records set uid = 2;
> (uid is an integer. It has a btree index)

> This update takes more than 20 minutes to execute. Is this normal?

Takes about 20 seconds to update a table of that size on my machine...

What PG version is this?  We used to have some performance issues with
very large numbers of equal keys in btree indexes.  Does dropping the
index make it faster?

Are there foreign keys referencing this table from other tables?

			regards, tom lane



view thread (18+ messages)  latest in thread

Message-ID: <15725.1113316540@sss.pgh.pa.us>
Permalink:  ../15725.1113316540@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15725.1113316540@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, bendik.johansen@gmail.com
  Subject: Re: Slow update
  In-Reply-To: <15725.1113316540@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