From: Tom Lane <tgl@sss.pgh.pa.us>
To: Denis <denis.sailer@yellowbook.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Update using primary key slow
Date: Thu, 27 Oct 2005 12:18:03 -0400
Message-ID: <19722.1130429883@sss.pgh.pa.us> (raw)
In-Reply-To: <Xns96FC6CBBEC0CDdenissaileryellowboo@200.46.204.72>
References: <Xns96FC6CBBEC0CDdenissaileryellowboo@200.46.204.72>
Denis <denis.sailer@yellowbook.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
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, denis.sailer@yellowbook.com
Subject: Re: Update using primary key slow
In-Reply-To: <19722.1130429883@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