short circuit suggestion in find_hash_columns()

Поиск
Список
Период
Сортировка
От Zhihong Yu
Тема short circuit suggestion in find_hash_columns()
Дата
Msg-id CALNJ-vQmBS0kLW60gHgH5wifPfhHp5mN2U7HnEtfcqR54Bw+nA@mail.gmail.com
обсуждение исходный текст
Ответы Re: short circuit suggestion in find_hash_columns()
Список pgsql-hackers
Hi,
I was looking at find_hash_columns() in nodeAgg.c

It seems the first loop tries to determine the max column number needed, along with whether all columns are needed.

The loop can be re-written as shown in the patch.

In normal cases, we don't need to perform scanDesc->natts iterations.
In best case scenario, the loop would terminate after two iterations.

Please provide your comment.

Thanks
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Domingo Alvarez Duarte
Дата:
Сообщение: Re: Grammar railroad diagram
Следующее
От: David Rowley
Дата:
Сообщение: Re: Record a Bitmapset of non-pruned partitions