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 858F411F6982 for ; Wed, 12 Apr 2006 21:43:46 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.196 X-Spam-Level: X-Spam-Status: No, score=-2.196 required=5 tests=[AWL=0.403, BAYES_00=-2.599] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id gqhan5Mrt9Ne for ; Wed, 12 Apr 2006 21:43:46 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 795AC11F60B1 for ; Wed, 12 Apr 2006 21:43:43 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 9230E56423; Wed, 12 Apr 2006 19:43:44 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Wed, 12 Apr 2006 19:43:42 -0500 Date: Wed, 12 Apr 2006 19:43:41 -0500 From: "Jim C. Nasby" To: Sriram Dandapani Cc: pgsql-performance@postgresql.org Subject: Re: multi column query Message-ID: <20060413004340.GQ49405@pervasive.com> References: <6992E470F12A444BB787B5C937B9D4DF03EF488C@ca-mail1.cis.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6992E470F12A444BB787B5C937B9D4DF03EF488C@ca-mail1.cis.local> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060413:sdandapani@counterpane.com::eITQ4xOe/F/syoKd:00000000000 000000000000000000000000Fvxe X-Hashcash: 1:20:060413:pgsql-performance@postgresql.org::Y4mY13JSWcefcMgd:00000 0000000000000000000000002AfJ X-Archive-Number: 200604/282 X-Sequence-Number: 18366 On Wed, Apr 12, 2006 at 05:32:32PM -0700, Sriram Dandapani wrote: > Hi > > When I update a table that has 20 columns and the where clause includes > 16 of the columns (this is a data warehousing type update on aggregate > fields), > > The bitmap scan is not used by the optimizer. The table is indexed on 3 > of the 20 fields. The update takes really long to finish (on a 6 million > row table) > > Do I need to do some "magic" with configuration to turn on bitmap scans. No. What's explain analyze of the query show? What's it doing now? Seqscan? You might try set enable_seqscan=off and see what that does. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461