| От | Tom Lane |
|---|---|
| Тема | Re: Numeric performances |
| Дата | |
| Msg-id | 19101.1180967738@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Numeric performances (Vincenzo Romano <vincenzo.romano@gmail.com>) |
| Ответы |
Re: Numeric performances
|
| Список | pgsql-general |
Vincenzo Romano <vincenzo.romano@gmail.com> writes:
> It sounds quite strange to me that numeric is faster than bigint.
This test is 100% faulty, because it fails to consider the fact that the
accumulator used by sum() isn't necessarily the same type as the input
data. In fact we sum ints in a bigint and bigints in a numeric to avoid
overflow.
If you try it with max() you'd likely get less-surprising answers.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера