Re: Remove useless GROUP BY columns considering unique index
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: jian he <jian.universality@gmail.com>
Cc: Zhang Mingli <zmlpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-11-29T02:39:03Z
Lists: pgsql-hackers
Attachments
- v9-0001-remove-useless-group-by-columns-via-unique-not-nu.patch (application/octet-stream) patch v9-0001
On Fri, 29 Nov 2024 at 15:02, David Rowley <dgrowleyml@gmail.com> wrote: > I've attached an updated patch that gets rid of the > get_unique_not_null_attnos() function completely and uses the > RelOptInfo.indexlist and RelOptInfo.notnullattnums. I forgot to do a local commit before sending v8. Fixed in the attached v9. David
Commits
-
Detect redundant GROUP BY columns using UNIQUE indexes
- bd10ec529796 18.0 landed
-
Defer remove_useless_groupby_columns() work until query_planner()
- 430a5952deb3 18.0 landed