Re: Remove useless GROUP BY columns considering unique index
От | jian he |
---|---|
Тема | Re: Remove useless GROUP BY columns considering unique index |
Дата | |
Msg-id | CACJufxHPRYVpXsjNKkeu0NYdLnGY7eoB1thtuUiGGrSE4+fz0w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Remove useless GROUP BY columns considering unique index (David Rowley <dgrowleyml@gmail.com>) |
Ответы |
Re: Remove useless GROUP BY columns considering unique index
|
Список | pgsql-hackers |
On Fri, Nov 29, 2024 at 5:20 PM David Rowley <dgrowleyml@gmail.com> wrote: > > The reason I don't think is possible is that we have no infrastructure > that allows us to tag functions or operators so that non-null input(s) > mean non-null outputs. We only have strict, which means null input > means null output. That's the opposite of what we'd need. It might > only be possible with a NULLS NOT DISTINCT index. > Thank you for pointing out "non-null input(s) mean non-null outputs" . I didn't think about it at all. regarding v10. you placed remove_useless_groupby_columns right after add_base_rels_to_query makes so much sense. so we can be safely use cached RelOptInfo->indexlist, RelOptInfo->notnullattnums overall it didn't find any issue.
В списке pgsql-hackers по дате отправления: