Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 489EC64FF13 for ; Mon, 22 Dec 2008 07:34:39 -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 95096-09 for ; Mon, 22 Dec 2008 07:34:37 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from viefep18-int.chello.at (viefep15-int.chello.at [62.179.121.35]) by mail.postgresql.org (Postfix) with ESMTP id 7B16864FF09 for ; Mon, 22 Dec 2008 07:34:36 -0400 (AST) Received: from edge01.upc.biz ([192.168.13.236]) by viefep15-int.chello.at (InterMail vM.7.09.01.00 201-2219-108-20080618) with ESMTP id <20081222113433.EAZT1325.viefep15-int.chello.at@edge01.upc.biz> for ; Mon, 22 Dec 2008 12:34:33 +0100 Received: from [192.168.1.104] ([89.134.230.11]) by edge01.upc.biz with edge id uBaY1a02F0FQLHV01BaZTR; Mon, 22 Dec 2008 12:34:33 +0100 X-SourceIP: 89.134.230.11 Message-ID: <494F7B48.6070204@shopzeus.com> Date: Mon, 22 Dec 2008 12:34:32 +0100 From: Laszlo Nagy User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: "pgsql-performance@postgresql.org" Subject: Re: Slow table update References: <494F749A.5090603@shopzeus.com> In-Reply-To: <494F749A.5090603@shopzeus.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.125 tagged_above=0 required=5 tests=DNS_FROM_RFC_BOGUSMX=2.125 X-Spam-Level: ** X-Archive-Number: 200812/186 X-Sequence-Number: 32222 Laszlo Nagy wrote: > SQL: > > update product set sz_category_id=null where am_style_kw1 is not null > and sz_category_id is not null Hmm, this query: select count(*) from product where am_style_kw1 is not null and sz_category_id is not null and sz_category_id<>4809 opens in 10 seconds. The update would not finish in 2600 seconds. I don't understand. L