Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id AB1D264FD98 for ; Mon, 10 Nov 2008 12:41:43 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 21725-02 for ; Mon, 10 Nov 2008 12:41:43 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.gransy.com (unknown [82.208.29.208]) by mail.postgresql.org (Postfix) with ESMTP id 0551964FD41 for ; Mon, 10 Nov 2008 12:41:42 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by mail.gransy.com (Postfix) with ESMTP id A3E2C7AC03C; Mon, 10 Nov 2008 17:41:40 +0100 (CET) Received: from mail.gransy.com ([127.0.0.1]) by localhost (nathalia.gransy.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6StRXiDABPd2; Mon, 10 Nov 2008 17:41:40 +0100 (CET) Received: from anastacia.gransy.com (anastacia.gransy.com [89.187.130.100]) by mail.gransy.com (Postfix) with ESMTP id 84B597AC002; Mon, 10 Nov 2008 17:41:40 +0100 (CET) Received: from sq.gransy.com (localhost [127.0.0.1]) by anastacia.gransy.com (Postfix) with ESMTP id 907CF31F40A; Mon, 10 Nov 2008 17:41:40 +0100 (CET) Received: from 89.102.139.23 (SquirrelMail authenticated user tv@fuzzy.cz) by sq.gransy.com with HTTP; Mon, 10 Nov 2008 17:41:40 +0100 (CET) Message-ID: <61593.89.102.139.23.1226335300.squirrel@sq.gransy.com> In-Reply-To: <200811101730.15902@centrum.cz> References: <200811101728.3048@centrum.cz> <200811101729.14977@centrum.cz> <200811101730.11057@centrum.cz> <200811101730.15902@centrum.cz> Date: Mon, 10 Nov 2008 17:41:40 +0100 (CET) Subject: Re: slow full table update From: tv@fuzzy.cz To: firerox@centrum.cz Cc: pgsql-performance@postgresql.org User-Agent: SquirrelMail/1.4.10a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-2 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Archive-Number: 200811/62 X-Sequence-Number: 31793 Sorry, but you have to provide much more information about the table. The information you've provided is really not sufficient - the rows might be large or small. I guess it's the second option, with a lots of dead rows. Try this: ANALYZE table; SELECT relpages, reltuples FROM pg_class WHERE relname = 'table'; Anyway, is the autovacuum running? What are the parameters? Try to execute VACUUM table; and then run the two commands above. That might 'clean' the table and improve the update performance. Don't forget each such UPDATE will actually create a copy of all the modified rows (that's how PostgreSQL works), so if you don't run VACUUM periodically or autovacuum demon, then the table will bloat (occupy much more disk space than it should). If it does not help, try do determine if the UPDATE is CPU or disk bound. I'd guess there are problems with I/O bottleneck (due to the bloating). regards Tomas > Hi, > > I have table with cca 60.000 rows and > when I run query as: > Update table SET column=0; > after 10 minutes i must stop query, but it still running :( > > I've Postgres 8.1 with all default settings in postgres.conf > > Where is the problem? > > Thak you for any tips. > > best regards. > Marek Fiala > > > > > > > > -- > Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-performance >