Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YBy5g-0003X9-Tz for pgsql-performance@arkaria.postgresql.org; Fri, 16 Jan 2015 04:00:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YBy5g-0001ry-DU for pgsql-performance@arkaria.postgresql.org; Fri, 16 Jan 2015 04:00:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YBy5f-0001q8-3Q for pgsql-performance@postgresql.org; Fri, 16 Jan 2015 04:00:55 +0000 Received: from mail.catalyst.net.nz ([2404:130:0:10::40:0]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YBy5a-0003UR-7L for pgsql-performance@postgresql.org; Fri, 16 Jan 2015 04:00:54 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.catalyst.net.nz (Postfix) with ESMTP id 065573222C; Fri, 16 Jan 2015 17:00:45 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at catalyst.net.nz Received: from mail.catalyst.net.nz ([127.0.0.1]) by localhost (bertrand.catalyst.net.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id maE062I9tAum; Fri, 16 Jan 2015 17:00:44 +1300 (NZDT) Received: from [IPv6:2404:130:0:1000:9107:c07f:1300:5b09] (unknown [IPv6:2404:130:0:1000:9107:c07f:1300:5b09]) (Authenticated sender: mark.kirkwood) by mail.catalyst.net.nz (Postfix) with ESMTPSA id 2EF1032213; Fri, 16 Jan 2015 17:00:44 +1300 (NZDT) Message-ID: <54B88CEC.9080009@catalyst.net.nz> Date: Fri, 16 Jan 2015 17:00:44 +1300 From: Mark Kirkwood User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Josh Berkus , postgres performance list Subject: Re: Strange choice of general index over partial index References: <54B83F70.7080004@agliodbs.com> <54B85D32.7090106@catalyst.net.nz> <54B87820.3090101@catalyst.net.nz> <54B88032.7020206@catalyst.net.nz> <54B882B8.2050303@catalyst.net.nz> <54B88562.4040500@agliodbs.com> In-Reply-To: <54B88562.4040500@agliodbs.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) 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 16/01/15 16:28, Josh Berkus wrote: > On 01/16/2015 04:17 PM, Mark Kirkwood wrote: >> On 16/01/15 16:06, Mark Kirkwood wrote: >> >>> A bit more poking about shows that the major factor (which this fake >>> dataset anyway) is the default for effective_cache_size (changes from >>> 128MB to 4GB in 9.4). Increasing this makes 9.2 start using the >>> files_in_flight index in a plain index scan too. >>> >> >> Arrg - misread the planner output....in 9.2 what changes is a plan that >> uses an index scan on the *file_state* index (not >> files_in_flight)...which appears much faster than the bitmap scan on >> file_state. Apologies for the confusion. >> >> I'm thinking that I'm seeing the effect Tom has just mentioned. > > It's not using a bitmapscan in either case; it's a straight indexscan. > > Right, I suspect that bloating is possibly the significant factor then - can you REINDEX? Cheers Mark -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance