Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 070799FBDAB for ; Thu, 5 Apr 2007 12:35:04 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 04074-07 for ; Thu, 5 Apr 2007 12:34:58 -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.250]) by postgresql.org (Postfix) with ESMTP id 675789FB536 for ; Thu, 5 Apr 2007 12:34:58 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c24so718455ana for ; Thu, 05 Apr 2007 08:34:57 -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=JB+9wl4Cjs2t7CWZNAeSfjL6Q5e+O+k9h1pSgiKp+PmQ/gBaRCZgME3PjJaidqg0d0ViGlQ1uPj44OGbNPXMtZwMPOfUiMFCDSV+Efr1sQcpaQsFQay+ea5JalKfpVnWIH7Z3SCdywFdEWiukA8fqt7RcWrvRrP3Tr14rAWh73U= 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=SXSrW6EQ9iDWb63P5BXU9nGUwrVz5stEV+m+TcX8781tj620FDoS8JGq1Qz0oLatmSgTa39cJKJZJZ+AlJhR44IxHMglOfAfuAb2DbPt3tYaDzAikNAJPl5MT7pDEHuNDYSLOyvBm1aTB4FD0c5YxsnoUHYO3m8L8sXjjbH6PeU= Received: by 10.100.177.16 with SMTP id z16mr1357657ane.1175787297680; Thu, 05 Apr 2007 08:34:57 -0700 (PDT) Received: by 10.100.247.7 with HTTP; Thu, 5 Apr 2007 08:34:57 -0700 (PDT) Message-ID: Date: Thu, 5 Apr 2007 11:34:57 -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: 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/102 X-Sequence-Number: 23979 Ok, well, I dropped the DB and reloaded it and now all seems to be fine and performing well. I'm not sure what was going on before. Thanks for everyone's help! Alex On 4/3/07, Alex Deucher wrote: > 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 >