Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 205559FB4E1 for ; Tue, 3 Apr 2007 17:34:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 07272-05 for ; Tue, 3 Apr 2007 17:34:20 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.246]) by postgresql.org (Postfix) with ESMTP id 4AB029FB55F for ; Tue, 3 Apr 2007 17:34:20 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c24so1839532ana for ; Tue, 03 Apr 2007 13:34:19 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dqpJpstMofUOidFX9NAUXQk/fTdxr10Kx/o6gyvEx63ZDe7IShHMRJF0ZsnQRkhuxsFu3U5LlopBIXVrOyXVfMBw1HfVSE+KQ91RuKkaPBOSqGlsnbkd9ThzULyzGv5dzhvXpxjTnDwXGrVz5abWBgjKqsge3Tt+v19vbGoSy+w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=O3dHDoS++S6eAZIjrekTgLne/wQK/BjC+ziWgzXk7H8oUoP8lUG3Wh8IAmVukGKaFDfoGr7KpNDqr92xIqrdlR5PXVxMWuF9Bm0FBni3aSj8JZtPkH5t1C7pu4FaZsyqhKLGZOU2mfTpba6rOWb/sl8g5AlRDpgZzZNTxKIt14M= Received: by 10.100.190.8 with SMTP id n8mr4776972anf.1175632459314; Tue, 03 Apr 2007 13:34:19 -0700 (PDT) Received: by 10.100.247.7 with HTTP; Tue, 3 Apr 2007 13:34:19 -0700 (PDT) Message-ID: Date: Tue, 3 Apr 2007 16:34:19 -0400 From: "Alex Deucher" To: "Merlin Moncure" Subject: Re: postgres 7.4 vs 8.x redux: query plans Cc: "Tom Lane" , "PostgreSQL Performance" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <17931.1175578083@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/36 X-Sequence-Number: 23913 On 4/3/07, Alex Deucher wrote: > On 4/3/07, Merlin Moncure wrote: > > On 4/3/07, Alex Deucher wrote: > > (('{AB6698130,AB7076908,AB6499382,AB6438888,AB6385893,AB6378237,AB7146973,AB7127138,AB7124531,AB7124513,AB7123427,AB7121183,AB7121036,AB7110101,AB7100321,AB7089845,AB7088750,AB7031384,AB7021188,AB7006144,AB6988331,AB6973865,AB6966775,AB6935066,AB6931779,AB6923412,AB6902405,AB6892488,AB6886288,AB6880467,AB6874269,AB6871439,AB6868615,AB6819495,AB6807740,AB6799138,AB6796038,AB6769347,AB6732987,AB6722076,AB6718130,AB6717543,AB6714564,AB6701821,AB6667761,AB6666630,AB6655069,AB6648287,AB6643969,AB6636412}'::character > > > varying[])::text[])) > > > -> Bitmap Index Scan on t1_pkey (cost=0.00..216.69 rows=50 > > > width=0) (actual time=198.188..198.188 rows=50 loops=1) > > > Index Cond: ((num)::text = ANY > > > > bitmap scan: > > * did you run analyze? > > yes. > > > * is effective_cache_size set properly? > > It should be. I based it on the output of `free`. It's set to 988232. > The system has 8 GB of ram. > > > * if nothing else works, try disable bitmap scan and running query. > > I'll give that a try and post the results. > Turning off bitmapscan ends up doing a sequential scan. Turning off both bitmapscan and seqscan results in a bitmap heap scan. It doesn't seem to want to use the index at all. Any ideas? Alex