Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9dkr-0001Nh-5p for pgsql-performance@arkaria.postgresql.org; Sun, 05 Jun 2016 19:30:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b9dkq-0003B6-Bh for pgsql-performance@arkaria.postgresql.org; Sun, 05 Jun 2016 19:30:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b9djA-0001BY-MX for pgsql-performance@postgresql.org; Sun, 05 Jun 2016 19:28:52 +0000 Received: from mail-vk0-x22b.google.com ([2607:f8b0:400c:c05::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1b9dj7-0008Gi-MF for pgsql-performance@postgresql.org; Sun, 05 Jun 2016 19:28:51 +0000 Received: by mail-vk0-x22b.google.com with SMTP id d64so51489316vkb.0 for ; Sun, 05 Jun 2016 12:28:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=QtGLpjaJ4hbnOHYdyjDk/7mGoZeB6wBWqOAND7uLYbs=; b=0sXMsNYEB6WEBzP7jkRuI3zCLz5FNQ6oNLtGqPM+eC64bP+jCiK09iSAkQDTH1QvZo 6Bfk1jxADaz9lQuFKg0hozbiozHJdcvp1kRlMwfzXvWkqD7zHAp90tLhBJwvrWu4/OF0 SvWTPwJJUKTq6iBSjl1gnhTFIhRFJQBb1Cm79ZpNmk3izAlZYu6nvHTfqYw/6TVu0swW ElpzdzwQ+9dQTgXnVBlizGqGQpX/oQafsXBrZOQ8R0z6NyIlZzzSnkAGooGzI0BOyRq7 P3pPgLcw7bZ0twVsCU3Iyva23QB3J0WaW2DdtinYRALh06BRvfuHtqr+eDOCTQC1TMxa RS1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=QtGLpjaJ4hbnOHYdyjDk/7mGoZeB6wBWqOAND7uLYbs=; b=B6cO5C0EL7O+Ur9fxoFpT9/eiHE5tqrkh9qkw8C7kLLESCWPAqZGY+OY4VGUMG558q IKPVjAvn/0RVJTiSG04gGY7kKSOYegJ0I8GeGAl33fF7XRmk+mhUroguGvoQwjOYZiCR Ac1263eZ3I84mt0mVLrgy5Hh7YGGUVLVURcTEOtu8BuTm6838mskhyfibg3HfWclkbGx AamZJ1tDbnfzX2XDlOB2LMYzheB37qzDk1T0V9LRBid5AMz5rm4CKxb7RQLFqwZ0y3IE YLzQnKjvfji9bzqLCIFnapQmd7oeWSOQY2dJtuY9SxIFWXyhinC6p0484iVJKWJ3Z2Zb NlfQ== X-Gm-Message-State: ALyK8tISrph4sfzZEGcDKWSmwouWCrrKl9lw6TfT3i+RPXh0MUjHfFDFbL/2RNiTFTY7Av0kuY1hGN1gjZi9Ng== X-Received: by 10.159.33.168 with SMTP id 37mr6488737uac.125.1465154927753; Sun, 05 Jun 2016 12:28:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.131.73 with HTTP; Sun, 5 Jun 2016 12:28:47 -0700 (PDT) In-Reply-To: <969.1465142638@sss.pgh.pa.us> References: <20160524173914.GA11880@telsasoft.com> <20160525140034.GB21220@telsasoft.com> <20160603235406.GN23616@telsasoft.com> <969.1465142638@sss.pgh.pa.us> From: Jeff Janes Date: Sun, 5 Jun 2016 12:28:47 -0700 Message-ID: Subject: Re: index fragmentation on insert-only table with non-unique column To: Tom Lane Cc: Claudio Freire , Justin Pryzby , postgres performance list Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.7 (--) 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 Sun, Jun 5, 2016 at 9:03 AM, Tom Lane wrote: > Claudio Freire writes: >> So correlated index scans look extra favourable vs bitmap index scans >> because bitmap heap scans consider random page costs sans correlation >> effects (even though correlation applies to bitmap heap scans as >> well). > > Really? How? The index ordering has nothing to do with the order in > which heap tuples will be visited. It is not the order itself, but the density. If the index is read in a range scan (as opposed to =ANY scan), and the index lead column is correlated with the table ordering, then the parts of the table that need to be visited will be much denser than if there were no correlation. But Claudio is saying that this is not being accounted for. Cheers, Jeff -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance