Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UPxOB-0004sd-WB for pgsql-performance@arkaria.postgresql.org; Wed, 10 Apr 2013 15:56:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UPxOB-0004PA-FA for pgsql-performance@arkaria.postgresql.org; Wed, 10 Apr 2013 15:56:47 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UPxOA-0004P5-LN for pgsql-performance@postgresql.org; Wed, 10 Apr 2013 15:56:46 +0000 Received: from outbound.afilias.info ([66.199.183.4]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UPxO6-0003Nf-J4 for pgsql-performance@postgresql.org; Wed, 10 Apr 2013 15:56:45 +0000 Received: from ms5.on1.afilias-ops.info ([10.109.8.9] helo=smtp.afilias.info) by outbound.afilias.info with esmtp (Exim 4.69) (envelope-from ) id 1UPxO4-0005BO-54 for pgsql-performance@postgresql.org; Wed, 10 Apr 2013 15:56:40 +0000 Received: from mail-ob0-f200.google.com ([209.85.214.200]) by smtp.afilias.info with esmtps (TLSv1:RC4-SHA:128) (Exim 4.72) (envelope-from ) id 1UPxO4-0007f5-4p for pgsql-performance@postgresql.org; Wed, 10 Apr 2013 15:56:40 +0000 Received: by mail-ob0-f200.google.com with SMTP id uz6so3506487obc.3 for ; Wed, 10 Apr 2013 08:56:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-received:message-id:date:from:user-agent:mime-version :to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding:x-gm-message-state; bh=t3uD4kYal0fLmQY+hY99KOOjHZg8/29WelSR2wBUl3I=; b=NNKRV5tsGr5GjzjBEfCtXf9VhxnzZj5IcR7AlSPZ3IyWCsr7fD/hb4wGjP+KIOu0Ho XMfTQ9WnIRMs0pXebDQxB3r5U7YFx13W/4qJ9h9La3nxo+TSWqfD32khJGJUEx6vSXvE ZIHCafC+rNgqgSaLkCEW0wyU1w4tMXxfGGsoV10wccQ4W5JGAjzyCOEofmrjUh2dqeVI 09ICh5rdaORUyZyd2tmWu395UtvMq8yGP5BDk208WoVCgW1UEu9U+Y5s0GFyW0zukv6F VVpkBQ9dULUKemKp0xUBDnKZwUQDV+S4CBY6/d9cV5iA25oBF2JvFUY1JfdWJlq+GK03 9t+g== X-Received: by 10.50.114.195 with SMTP id ji3mr1844740igb.67.1365609394846; Wed, 10 Apr 2013 08:56:34 -0700 (PDT) X-Received: by 10.50.114.195 with SMTP id ji3mr1844734igb.67.1365609394779; Wed, 10 Apr 2013 08:56:34 -0700 (PDT) Received: from [192.168.1.5] ([64.231.26.209]) by mx.google.com with ESMTPS id ie7sm27735142igb.1.2013.04.10.08.56.33 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Apr 2013 08:56:34 -0700 (PDT) Message-ID: <51658BB0.4000808@ca.afilias.info> Date: Wed, 10 Apr 2013 11:56:32 -0400 From: Steve Singer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: "ktm@rice.edu" CC: pgsql-performance@postgresql.org Subject: Re: slow bitmap heap scans on pg 9.2 References: <51656E03.7000701@ca.afilias.info> <20130410135657.GY32580@aart.rice.edu> In-Reply-To: <20130410135657.GY32580@aart.rice.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQngTRw8w+GZmNV5gPbfRY44+bcDl2X2A/5/1qABGzFNMs1gesUJkJM0PPKGohk1UsUwvcLzZ7Fkdf7/QClqZrAkzBXPmrqeP0f9fzGZKeStN9gf66TK+GRj7NUygFALoeevFEO+8lt6tx1Dh4EUH1Ut9bHYevBOpUMkr1es2oZEyeoqVZ4= X-Pg-Spam-Score: -4.3 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 13-04-10 09:56 AM, ktm@rice.edu wrote: > On Wed, Apr 10, 2013 at 09:49:55AM -0400, Steve Singer wrote: > > Hi Steve, > > The one thing that stands out to me is that you are working with 200GB of > data on a machine with 4-8GB of ram and you have the random_page_cost set > to 2.0. That is almost completely uncached and I would expect a value of > 10 or more to be closer to reality. Setting random_page_cost to 15 makes the planner choose the nested-loop plan (at least the date range I tried). I thought that the point of effective cache size was to tell the planner high likely it is for a random page to be in cache. With 200GB of data for this query and an effective cache size of 3.5 GB I would have expected that to be accounted for. > > Regards, > Ken > > -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance