X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id DEBD411F8D28 for ; Thu, 20 Apr 2006 12:41:53 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.368 X-Spam-Level: X-Spam-Status: No, score=-2.368 required=5 tests=[AWL=0.233, BAYES_00=-2.599, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id wnx1I-oJ99x1 for ; Thu, 20 Apr 2006 12:41:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 05BE711F8D2C for ; Thu, 20 Apr 2006 12:41:45 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k3KFffL6018974; Thu, 20 Apr 2006 11:41:41 -0400 (EDT) To: "Radovan Antloga" cc: pgsql-performance@postgresql.org Subject: Re: Performance decrease In-reply-to: <011b01c6648e$067ee170$1e4ba8c0@AR6> References: <011b01c6648e$067ee170$1e4ba8c0@AR6> Comments: In-reply-to "Radovan Antloga" message dated "Thu, 20 Apr 2006 17:20:56 +0200" Date: Thu, 20 Apr 2006 11:41:41 -0400 Message-ID: <18973.1145547701@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200604/457 X-Sequence-Number: 18541 "Radovan Antloga" writes: > My test table has 15830 records with 190 fields. 190 fields in a table seems like rather a lot ... is that actually representative of your intended applications? > I do like this: > update table > set field = null Again, is that representative of something you'll be doing a lot in practice? Most apps don't often update every row of a table, in my experience. > After first execute I get time 3 seconds. Then I repeat > this update. After each update time increase. I get > 4 sec, 7 sec, 10 sec, 12 sec, 15 sec, 18 sec, 21 sec. There should be some increase because of the addition of dead rows, but both the original 3 seconds and the rate of increase seem awfully high for such a small table. What are you running this on? For comparison purposes, here's what I see on a full-table UPDATE of a 10000-row table on a rather slow HP box: regression=# \timing Timing is on. regression=# create table t1 as select * from tenk1; SELECT Time: 1274.213 ms regression=# update t1 set unique2 = null; UPDATE 10000 Time: 565.664 ms regression=# update t1 set unique2 = null; UPDATE 10000 Time: 589.839 ms regression=# update t1 set unique2 = null; UPDATE 10000 Time: 593.735 ms regression=# update t1 set unique2 = null; UPDATE 10000 Time: 615.575 ms regression=# update t1 set unique2 = null; UPDATE 10000 Time: 755.456 ms regression=# Vacuuming brings the time back down: regression=# vacuum t1; VACUUM Time: 242.406 ms regression=# update t1 set unique2 = null; UPDATE 10000 Time: 458.028 ms regression=# regards, tom lane