Re: [HACKERS] Account for cost and selectivity of HAVING quals
От | David G. Johnston |
---|---|
Тема | Re: [HACKERS] Account for cost and selectivity of HAVING quals |
Дата | |
Msg-id | CAKFQuwb=ZKj1RnJBt4fn1xhBdRJGPJfsHEs0HYrNgD9zgvU35g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Account for cost and selectivity of HAVING quals ("Tels" <nospam-pg-abuse@bloodgate.com>) |
Ответы |
Re: [HACKERS] Account for cost and selectivity of HAVING quals
Re: [HACKERS] Account for cost and selectivity of HAVING quals |
Список | pgsql-hackers |
That looks odd to me, it first uses output_tuples in a formula, then
overwrites the value with a new value. Should these lines be swapped?
IIUC it is correct: the additional total_cost comes from processing every output group to check whether it is qualified - since every group is checked the incoming output_tuples from the prior grouping is used. The side-effect of the effort is that the number of output_tuples has now been reduced to only those matching the qual - and so it now must take on a new value to represent this.
David J.
В списке pgsql-hackers по дате отправления: