X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id BE198D1B4E3 for ; Mon, 13 Oct 2003 15:06:36 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 17572-04 for ; Mon, 13 Oct 2003 12:05:51 -0300 (ADT) Received: from joeconway.com (66-146-172-86.skyriver.net [66.146.172.86]) by svr1.postgresql.org (Postfix) with ESMTP id 671DAD1B4E5 for ; Mon, 13 Oct 2003 12:05:46 -0300 (ADT) Received: from [192.168.5.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 4.1.5) with ESMTP-TLS id 424127; Mon, 13 Oct 2003 08:04:55 -0700 Message-ID: <3F8ABEFB.4010107@joeconway.com> Date: Mon, 13 Oct 2003 08:04:27 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Griffiths Cc: pgsql-performance@postgresql.org Subject: Re: Another weird one with an UPDATE References: <052001c39030$1ccc8020$6501a8c0@griffiths2> <05a401c3903f$a8524850$6501a8c0@griffiths2> <20031011153251.F57866@megazone.bigpanda.com> <080d01c3912a$1356dea0$6501a8c0@griffiths2> <3F8A01CE.2040003@joeconway.com> <098a01c39152$3e231c20$6501a8c0@griffiths2> In-Reply-To: <098a01c39152$3e231c20$6501a8c0@griffiths2> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/424 X-Sequence-Number: 4172 David Griffiths wrote: > Yes, the query operates only on indexed columns (all numeric(10)'s). > > Column | Type | > Modifiers > -------------------------------+-----------------------------+-------------- > --------------- > user_account_id | numeric(10,0) | not null > [snip] > Indexes: user_account_pkey primary key btree (user_account_id), > Foreign Key constraints: $1 FOREIGN KEY (lang_id) REFERENCES lang(lang_id) > ON UPDATE NO ACTION ON DELETE NO ACTION, > $2 FOREIGN KEY (source_id) REFERENCES > source(source_id) ON UPDATE NO ACTION ON DELETE NO ACTION, > $3 FOREIGN KEY (user_role_id) REFERENCES > user_role(user_role_id) ON UPDATE NO ACTION ON DELETE NO ACTION And what about commercial_entity.user_account_id. Is it indexed and what is its data type (i.e. does it match numeric(10,0))? Also, have you run VACUUM ANALYZE lately? Joe