Skip site navigation (1) Skip section navigation (2)

Re: Update using primary key slow

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Denis <denis(dot)sailer(at)yellowbook(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Update using primary key slow
Date: 2005-10-27 16:18:03
Message-ID: 19722.1130429883@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Denis <denis(dot)sailer(at)yellowbook(dot)com> writes:
> The following update was captured in the database log and the elapsed time 
> was 1058.956 ms.  A later explain analyze shows total run time of 730 ms.  
> Although isn't the actual time to update the row 183 ms.  Where is the 
> other 547 ms coming from?  Updating the two secondary indexes??

The 183 msec is the time needed to *fetch* the row, not the time to
update it.  So it could well be that the other time is just the time
needed to update the table and indexes.  If this seems slower than
your hardware ought to be able to handle, I'd wonder about how recently
the table has been vacuumed.

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: DenisDate: 2005-10-27 18:09:57
Subject: Re: Update using primary key slow
Previous:From: Richard HuxtonDate: 2005-10-27 15:56:49
Subject: Re: how postgresql request the computer resources

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group