| From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Functional dependencies and GROUP BY |
| Date: | 2010-06-25 20:06:30 |
| Message-ID: | 1277496390.5356.23.camel@vanquo.pezone.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 | Content-Type | Size |
|---|---|---|
| functional-deps.patch | text/x-patch | 23.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Berkus | 2010-06-25 20:10:54 | Re: Admission Control |
| Previous Message | Kevin Grittner | 2010-06-25 19:52:22 | Re: Admission Control |