Re: Slow UPADTE, compared to INSERT - Mailing list pgsql-performance

From Ivar Zarans
Subject Re: Slow UPADTE, compared to INSERT
Date
Msg-id 20031205014514.GA21079@alcaron.ee
Whole thread Raw
In response to Re: Slow UPADTE, compared to INSERT  (Richard Huxton <dev@archonet.com>)
Responses Re: Slow UPADTE, compared to INSERT
List 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


pgsql-performance by date:

Previous
From: Jack Coates
Date:
Subject: Re: tuning questions
Next
From: Ivar Zarans
Date:
Subject: Re: Slow UPADTE, compared to INSERT