Re: Functional dependencies and GROUP BY - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Functional dependencies and GROUP BY
Date
Msg-id 1277496390.5356.23.camel@vanquo.pezone.net
Whole thread Raw
In response to Functional dependencies and GROUP BY  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Functional dependencies and GROUP BY  (Alex Hunsaker <badalex@gmail.com>)
List pgsql-hackers
On mån, 2010-06-07 at 21:33 +0300, Peter Eisentraut wrote:
> I have developed a patch that partially implements the "functional
> dependency" feature that allows some columns to be omitted from the
> GROUP BY clause if it can be shown that the columns are functionally
> dependent on the columns in the group by clause and therefore
> guaranteed to be unique per group.

Second version:

I stripped out all checks except the primary key/unique constraint
checks.

Views whose existence depends on one of those constraints get a
dependency recorded.  This depends on the patch currently in the commit
fest to record not null constraints in pg_constraint, so that the
dependencies on not-null constraints can be recorded.

I haven't done any caching of index lookups yet.  Some testing with
1600-column tables didn't show any effect.  I'll test this a little
more.


Attachment

pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Admission Control
Next
From: Josh Berkus
Date:
Subject: Re: Admission Control