Re: Why we don't want hints
Scott Marlowe <scott.marlowe@gmail.com>
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-performance@postgresql.org
Date: 2011-02-14T07:01:37Z
Lists: pgsql-hackers, pgsql-performance
On Sun, Feb 13, 2011 at 10:49 PM, Josh Berkus <josh@agliodbs.com> wrote: > >> I fail to see how 1 through 3 can tell the planner the correlation >> between two fields in two separate tables. > > CREATE CORRELATION_ESTIMATE ( table1.colA ) = ( table2.colB ) IS 0.3 > > ... and then it fixes the correlation for *every* query in the database, not > just that one. And is easy to fix if the correlation changes. I like that. Even better, could we setup some kind of simple command to tell analyze to collect stats for the two columns together?