Skip site navigation (1) Skip section navigation (2)

Re: Why we don't want hints Was: Slow count(*) again...

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: sthomas(at)peak6(dot)com, Josh Berkus <josh(at)agliodbs(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Why we don't want hints Was: Slow count(*) again...
Date: 2011-02-16 21:22:26
Message-ID: 201102162122.p1GLMQS29138@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-performance
Kevin Grittner wrote:
> Shaun Thomas <sthomas(at)peak6(dot)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(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

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

In response to

Responses

pgsql-performance by date

Next:From: Greg SmithDate: 2011-02-16 22:02:40
Subject: Re: Estimating hot data size
Previous:From: Tomas VondraDate: 2011-02-16 21:13:41
Subject: Re: Estimating hot data size

pgsql-hackers by date

Next:From: Dimitri FontaineDate: 2011-02-16 21:23:11
Subject: Re: Usability tweaks for extension commands
Previous:From: Dimitri FontaineDate: 2011-02-16 21:20:10
Subject: Re: contrib loose ends: 9.0 to 9.1 incompatibilities

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group