Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id CB26E9FB1E4 for ; Tue, 3 Apr 2007 19:17:24 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 96075-02 for ; Tue, 3 Apr 2007 19:17:17 -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.249]) by postgresql.org (Postfix) with ESMTP id 568FE9FA2F4 for ; Tue, 3 Apr 2007 19:17:21 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c24so1873706ana for ; Tue, 03 Apr 2007 15:17:20 -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=i96YZAb6Gds7G9yCcfrgtAuDmsm5j0GgfiHDFSm3uIbg74QUszIG5z1D+iYLLhtC4u0XFurgUll1ffebdX8m5cOAIhtPpFj3/sdkUpBAiLuhR7xrC2vHDNQKqATjK2ggAU5Z0GJz4GT4I54JnyiU5aKBM5xD5YVsaU62mVNqsQI= 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=Tg4Efb0lG+8wpbUj4ldLlSwTkss0lMw6a9lTYjNaaBFFSz3RUpmHtj2l9PYAL0+QgmeH3M3HRZMj3C+zk/baIfCJ4v1hJNz4FU0T70MCbJ2jqyHeCWZ2g5IoD3O12SqC5NkzeOYSxmX3LR8RDrAVcnvX2ioJ4SG+ntS7GuJLC3w= Received: by 10.100.190.8 with SMTP id n8mr4868364anf.1175638640129; Tue, 03 Apr 2007 15:17:20 -0700 (PDT) Received: by 10.100.247.7 with HTTP; Tue, 3 Apr 2007 15:17:20 -0700 (PDT) Message-ID: Date: Tue, 3 Apr 2007 18:17:20 -0400 From: "Alex Deucher" To: "Tom Lane" Subject: Re: postgres 7.4 vs 8.x redux: query plans Cc: "Merlin Moncure" , "PostgreSQL Performance" In-Reply-To: <12660.1175635265@sss.pgh.pa.us> 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> <12660.1175635265@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/42 X-Sequence-Number: 23919 On 4/3/07, Tom Lane wrote: > "Alex Deucher" writes: > > 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? > > The "ORed indexscans" plan style that was in 7.4 isn't there anymore; > we use bitmap OR'ing instead. There actually are repeated indexscans > hidden under the "= ANY" indexscan condition in 8.2, it's just that > the mechanism for detecting duplicate matches is different. AFAIK the > index access costs ought to be about the same either way, and the other > costs the same or better as what we did in 7.4. It's clear though that > 8.2 is taking some kind of big hit in the index access in your case. > There's something very strange going on here. > > You do have both lc_collate and lc_ctype set to C, right? What about > database encoding? > hmmm... ok, this is weird. performance seems to have improved significantly after I reloaded postgres after adding some hew hosts to the pg_hba.conf. I'll run some more tests and let you know what happens. Alex