Re: More stable query plans via more predictable column statistics
| От | Tom Lane |
|---|---|
| Тема | Re: More stable query plans via more predictable column statistics |
| Дата | |
| Msg-id | 26465.1457540894@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: More stable query plans via more predictable column statistics ("Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>) |
| Ответы |
Re: More stable query plans via more predictable column statistics
|
| Список | pgsql-hackers |
"Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de> writes:
> Yes, I now recall that my actual concern was that sample_cnt may calculate
> to 0 due to the latest condition above, but that also implies track_cnt ==
> 0, and then we have a for loop there which will not run at all due to this,
> so I figured we can avoid calculating avgcount and running the loop
> altogether with that check. I'm not opposed to changing the condition if
> that makes the code easier to understand (or dropping it altogether if
> calculating 0/0 is believed to be harmless anyway).
Avoiding intentional zero divides is good. It might happen to work
conveniently on your machine, but I wouldn't think it's portable.
regards, tom lane
В списке pgsql-hackers по дате отправления: