Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g4dFe-000896-GF for pgsql-performance@arkaria.postgresql.org; Tue, 25 Sep 2018 02:39:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g4dFa-0005yU-Fs for pgsql-performance@arkaria.postgresql.org; Tue, 25 Sep 2018 02:38:58 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g4dFZ-0005yF-Up for pgsql-performance@lists.postgresql.org; Tue, 25 Sep 2018 02:38:58 +0000 Received: from mail-it1-x143.google.com ([2607:f8b0:4864:20::143]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1g4dFW-0004wb-It for pgsql-performance@lists.postgresql.org; Tue, 25 Sep 2018 02:38:56 +0000 Received: by mail-it1-x143.google.com with SMTP id j198-v6so6136410ita.0 for ; Mon, 24 Sep 2018 19:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VDjAjBittp2s69gJhwMTXNxR7NKGDGzpGfMwj38sj+A=; b=0MCMdJ+ByfoqJBQF1tBBFNTnsfIHasg57gtlv3HdFiHOQ70mB5idi/d4RhKppnvdc4 0yc/hHDSsRGKEH1FiGwZNUEyWDHEQMZ70vcUMr7hMqVcWhGRgt1Cktkd9r8JukJQLlWS bY38Ia8tVc9S48JjuBShksAaf/8C2WzPDnbMRPaOlJkerXyUzo3hWTp0ohhYPJlxmOzU MgZbchVgvgbV0j3Rtq+eM7bAD7aGCFgy1kE78CWdT0UZw3DtVRpqTAuseJh0xm9zkwaZ hKXSElhYc1SulpZuUyqsGF7dbgPaH3sLlSnDyYj6I3GXiKg6y102RDHpSmQC9wottqo1 Ub/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=VDjAjBittp2s69gJhwMTXNxR7NKGDGzpGfMwj38sj+A=; b=bwLLD1gF3lp7IOYg9fl8YpDmS/UgAY24ZvouqnLHeYqUVpTuN3aptc8TjNuDjSQnTx pzBf3ifKnkZqOcApc/Zppu+Nzz++AjULljzqNP+jOu6yfET9r2DbfpLtfG01d+Tj1JHP CrQtc36w8M0BldwDv86X4LfVBZC9WkyRmvfr0+2/mv/CN1eWRl4T84A4YrD34pUb6CCZ sk44uvYe2Jo6AwHeaXCChqCfEDhMQEpYAuB2Xfnj1szGdaoLk18hebMlSjzX21rya76d Fk5TIDb8MvXGyE2bpBWx8nDs+X2eZydkWoDfqlHuLaRWiApuSu+WmXrDvg4T7wHCw77N tDyg== X-Gm-Message-State: ABuFfoguVIESdbhyOJ7pGnU1PjQVWyUIVgiMZmz8vztC66avQul2VOnt Wuq1GLsPuzBazI0CuUhKCZvfUQ== X-Google-Smtp-Source: ACcGV62NrgXUn2yzQsuBpsti85YONane/eISG3k4Hth+63v2N3rF2N2rn7lIRdzrMTVqTQYZgjswRg== X-Received: by 2002:a24:2848:: with SMTP id h69-v6mr1059275ith.63.1537843133327; Mon, 24 Sep 2018 19:38:53 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id j14-v6sm412487ioa.37.2018.09.24.19.38.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Sep 2018 19:38:52 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id 26A3A8025FB; Mon, 24 Sep 2018 21:38:52 -0500 (CDT) Date: Mon, 24 Sep 2018 21:38:52 -0500 From: Justin Pryzby To: Vladimir Ryabtsev Cc: f.pardi@portavita.eu, pgsql-performance@lists.postgresql.org Subject: Re: Why could different data in a table be processed with different performance? Message-ID: <20180925023852.GX2471@telsasoft.com> References: <4dbb8bea-bea3-74d8-a537-36bb9864cb9f@portavita.eu> <20180924233423.GV2471@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Sep 24, 2018 at 05:59:12PM -0700, Vladimir Ryabtsev wrote: > > This seems significant..it means the heap was probably written in > backwards > order relative to the IDs, and the OS readahead is ineffective when index > scanning across a range of IDs. > But again, why is it different for one range and another? It was reversed > for both ranges. I don't have an explaination for it.. but I'd be curious to know pg_stats.correlation for the id column: SELECT schemaname, tablename, attname, correlation FROM pg_stats WHERE tablename='articles' AND column='article_id' LIMIT 1; Justin