pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: sthomas@peak6.com, Josh Berkus <josh@agliodbs.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Why we don't want hints Was: Slow count(*) again...
Date: Wed, 16 Feb 2011 16:22:26 -0500 (EST)
Message-ID: <201102162122.p1GLMQS29138@momjian.us> (raw)
In-Reply-To: <4D53CA4F020000250003A789@gw.wicourts.gov>

Kevin Grittner wrote:
> Shaun Thomas <sthomas@peak6.com> wrote:
>  
> > how difficult would it be to add that syntax to the JOIN
> > statement, for example?
>  
> Something like this syntax?:
>  
> JOIN WITH (correlation_factor=0.3)
>  
> Where 1.0 might mean that for each value on the left there was only
> one distinct value on the right, and 0.0 would mean that they were
> entirely independent?  (Just as an off-the-cuff example -- I'm not
> at all sure that this makes sense, let alone is the best thing to
> specify.  I'm trying to get at *syntax* here, not particular knobs.)

I am not excited about the idea of putting these correlations in
queries.  What would be more intesting would be for analyze to build a
correlation coeffficent matrix showing how columns are correlated:

	a   b   c
    a   1   .4  0
    b   .1  1   -.3
    c   .2  .3  1

and those correlations could be used to weigh how the single-column
statistics should be combined.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +



view thread (26+ messages)  latest in thread

Message-ID: <201102162122.p1GLMQS29138@momjian.us>
Permalink:  ../201102162122.p1GLMQS29138@momjian.us/
Also on:    postgresql.org/message-id/201102162122.p1GLMQS29138@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: bruce@momjian.us, Kevin.Grittner@wicourts.gov, josh@agliodbs.com, robertmhaas@gmail.com
  Subject: Re: Why we don't want hints Was: Slow count(*) again...
  In-Reply-To: <201102162122.p1GLMQS29138@momjian.us>
  References: <4D53CA4F020000250003A789@gw.wicourts.gov> <201102162122.p1GLMQS29138@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox