Re: Slow update - Mailing list pgsql-performance

From Tom Lane
Subject Re: Slow update
Date
Msg-id 15725.1113316540@sss.pgh.pa.us
Whole thread Raw
In response to Slow update  (Bendik R.Johansen <bendik.johansen@gmail.com>)
Responses Re: Slow update  (Bendik R.Johansen <bendik.johansen@gmail.com>)
List pgsql-performance
"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

pgsql-performance by date:

Previous
From: Alex Turner
Date:
Subject: Re: profiling postgresql queries?
Next
From: Michael Fuhr
Date:
Subject: Re: profiling postgresql queries?