> - update bench set k500k = k500k + 1 where k100 = 30
>     with    indeces  unknown
>    without indeces 36 seconds

can you run an: explain update bench set k500k = k500k + 1 where k100 = 30;

> Still the poor update routines do not explain the
> strange behavior, that the postmaster runs for
> hours using at most 10% CPU, and all the time
> heavy disk activity is observed.

I suspect it is doing a seq scan. Thus explaining the heavy disk activity.
I have previously sent in a patch which will fix this if someone applies it.

Andreas


Wed, 26 May 1999 09:25:59 +0200
ZEUGSWETTER Andreas IZ5 <Andreas.Zeugswetter@telecom.at>
Re: [HACKERS] strange behavior of UPDATE
ZEUGSWETTER Andreas IZ5 <Andreas.Zeugswetter@telecom.at> writes:
> can you run an: explain update bench set k500k = k500k + 1 where k100 = 30;
> I suspect it is doing a seq scan.

No, that's not it:

test=> explain update bench set k500k = k500k + 1 where k100 = 30;
NOTICE:  QUERY PLAN:

Index Scan using k100 on bench  (cost=179.05 rows=2082 width=154)


The benchmark loads the tables first and then builds indexes, and
in fact does a vacuum analyze after that!  So the stats should be fine.

			regards, tom lane

Wed, 26 May 1999 09:39:12 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] strange behavior of UPDATE 