Search Postgresql Archives

Re: Numeric performances

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Vincenzo Romano <vincenzo.romano@xxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux