Re: Slow UPADTE, compared to INSERT

From: Ivar Zarans <iff(at)alcaron(dot)ee>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow UPADTE, compared to INSERT
Date: 2003-12-05 01:45:14
Message-ID: 20031205014514.GA21079@alcaron.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, Dec 04, 2003 at 10:45:21PM +0000, Richard Huxton wrote:

> If you've got the time, try putting together a small test-script with some
> dummy data and see if it's reproducible. I'm sure the other Python users
> would be interested in seeing where the problem is.

Tried with test-script, but this functioned normally (Murphy's law!).
Then tweaked postrgesql.conf and switched on debugging options. Results
show (in my opinion) that Python has nothing to do with slow UPDATE.
Timing from postgresql itself shows duration of 0.29 sec.

===
postgres[21247]: [2707] DEBUG: StartTransactionCommand
postgres[21247]: [2708-1] LOG: query:
postgres[21247]: [2708-2] UPDATE
postgres[21247]: [2708-3] imp_cdr_200311
postgres[21247]: [2708-4] SET
postgres[21247]: [2708-5] Status = 'SKIP'
postgres[21247]: [2708-6] WHERE
postgres[21247]: [2708-7] ImpRecID = '202425'
...
Skipped rewritten parse tree
...
postgres[21247]: [2710-1] LOG: plan:
postgres[21247]: [2710-2] { INDEXSCAN
postgres[21247]: [2710-3] :startup_cost 0.00
postgres[21247]: [2710-4] :total_cost 6.01
postgres[21247]: [2710-5] :rows 1
postgres[21247]: [2710-6] :width 199
postgres[21247]: [2710-7] :qptargetlist (
...
Skipped target list
...
postgres[21247]: [2711] DEBUG: CommitTransactionCommand
postgres[21247]: [2712] LOG: duration: 0.292529 sec
===

Any suggestions for further investigation?

--
Ivar Zarans

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Ivar Zarans 2003-12-05 02:07:28 Re: Slow UPADTE, compared to INSERT
Previous Message Jack Coates 2003-12-05 00:32:06 Re: tuning questions