Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UchHw-0005LA-4P for pgsql-performance@arkaria.postgresql.org; Wed, 15 May 2013 19:23:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UchHv-0005S6-Jf for pgsql-performance@arkaria.postgresql.org; Wed, 15 May 2013 19:22:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UchHu-0005S0-DH for pgsql-performance@postgresql.org; Wed, 15 May 2013 19:22:58 +0000 Received: from mail-pd0-f169.google.com ([209.85.192.169]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UchHp-0003IF-QV for pgsql-performance@postgresql.org; Wed, 15 May 2013 19:22:57 +0000 Received: by mail-pd0-f169.google.com with SMTP id y10so894462pdj.0 for ; Wed, 15 May 2013 12:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:to:cc:subject:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=2rZlSgRGL9mwcRR8YQUQSYIFqrlIvgFLSZwgO9TMBIU=; b=hzVEQ8TAd7hmFQzzyyF5UqDcp1qdEYCy7teDov1shWIbHXOhlcT8njWTMhtc1s56X7 /nxjPsl+6M4X7EIf7MKBPYJUqfxMwQmdtyv2XGovdVAqQvbUkKzxb4BkgQpRnrBGqpTX a4lujfgZANEwlZmf9FMQRNmOpB4d3JdrwYz01SauE5R+VNOXf89PYV1QQJbeJzh9fUeu alNyggQ2DtEgPAKOfegSgPQNNdWeV/y7zIck3iJxDiN8jpDZzfnjRUh7v3XVdvoQcgzX qv9BCOUG5J9ITAQjP/3pHbZkTyfDhnmyB9GShs4+BC1g6X/1EmAQ81jSJidbiu4j24rW lN8A== X-Received: by 10.66.149.227 with SMTP id ud3mr41390916pab.33.1368645772453; Wed, 15 May 2013 12:22:52 -0700 (PDT) Received: from eddie ([74.36.14.159]) by mx.google.com with ESMTPSA id iy2sm3777331pbb.31.2013.05.15.12.22.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 15 May 2013 12:22:51 -0700 (PDT) Message-ID: <5193e08b.8271440a.1813.1075@mx.google.com> Date: Wed, 15 May 2013 13:23:25 -0600 From: eggyknap To: Nikolas Everett Cc: Heikki Linnakangas , sthomas@optionshouse.com, "pgsql-performance@postgresql.org" Subject: Re: Thinking About Correlated Columns (again) References: <5193AA62.2040700@optionshouse.com> <5193AF36.3040409@vmware.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oj4kGyHlBMXGt3Le" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -2.0 (--) 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 --oj4kGyHlBMXGt3Le Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, May 15, 2013 at 01:30:57PM -0400, Nikolas Everett wrote: > The option that always made the most sense to me was having folks ask > postgres to collect the statistic by running some command that marks two > columns as correlated. This could at least be a starting point. One suggestion made in the past was to calculate these stats (provided someone comes up with something worthwhile to calculate, that is) for all columns involved in a multicolumn index. That probably doesn't cover all the places we'd like the planner to know stuff like this, but it's a reasonable start. -- Joshua Tolley / eggyknap End Point Corporation http://www.endpoint.com --oj4kGyHlBMXGt3Le Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJRk+CtAAoJEAn8+lmCiIgHlg8P/Rh2wXgqg44hmXmTKOIfWMUN RWbt49LduIlHH9UGl/l5GIlbzfvnOUAruhDBVUFCnvpEow2F5ZHLrCLvRBm4iSbS Eh0fuv5zm6RI1cpPtLCuNcrGzKiwb7tOfWSCvP+S7pvU3NdmLZAWTVz3KhndT99Y EmBykVmp/XVbnQ0obqFcchX3dG27wfTadAic0k29ODzD+A/Yk9ovRTQwoa8pjemN RRVrcWghiMu/vxm626PtY0/UBzGqgFUAcIZvlTcce4U+4+nI0oIsFmSdW4SJtHmG LLwa6dgjXfrYk8GOK8g3fgJVrpDDnd99tWwXV0xpkAQLLox9slmxC18bK5wdoT9b 8pFCeeDZu+1zcQzMWear92JxXP7jlhLhhoAb1YeDk1BB4hZisBXiYcRxoc5Afrxz HG7IpI2NdaXpQXhq7izlpy4i/r+Ozu4sSqhGML9iYkp7hkr6oQBXjtMr2VekDoB4 cKExEOSbVPfHnJlDSjgPn25H6HWh81cFwcgBxmKgm17mevVyVwdqF4R/dcbHlPgE TNq6Za4t8Jcg+2sI6NWHfGr9wvHuyt1gOk7M+wjMlHAe+H322PNnVCrfwsZ0DO8M 97b1HRRlr48aJ3G8LGxsilIEBOpIue6DzEowL0JtkaQa8XE8P+EkBq+alkWmNqwP aQOkuxWWg1DrAZssHBG9 =XdT9 -----END PGP SIGNATURE----- --oj4kGyHlBMXGt3Le--