X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 91923534C8 for ; Tue, 12 Apr 2005 11:35:48 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 14532-04 for ; Tue, 12 Apr 2005 14:35:45 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 91B41534EB for ; Tue, 12 Apr 2005 11:35:44 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j3CEZeTe015726; Tue, 12 Apr 2005 10:35:40 -0400 (EDT) To: "Bendik R.Johansen" Cc: PostgreSQL Perform Subject: Re: Slow update In-reply-to: <0201deb23790cee173bdd2d3f0e96642@gmail.com> References: <0201deb23790cee173bdd2d3f0e96642@gmail.com> Comments: In-reply-to "Bendik R.Johansen" message dated "Tue, 12 Apr 2005 16:12:32 +0200" Date: Tue, 12 Apr 2005 10:35:40 -0400 Message-ID: <15725.1113316540@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/228 X-Sequence-Number: 11625 "Bendik R.Johansen" writes: > I am having a bit of trouble updating a single integer column. > My table has around 10 columns and 260 000 records. > update no.records set uid = 2; > (uid is an integer. It has a btree index) > This update takes more than 20 minutes to execute. Is this normal? Takes about 20 seconds to update a table of that size on my machine... What PG version is this? We used to have some performance issues with very large numbers of equal keys in btree indexes. Does dropping the index make it faster? Are there foreign keys referencing this table from other tables? regards, tom lane