Re: Performance issues with large amounts of time-series data
От | Greg Stark |
---|---|
Тема | Re: Performance issues with large amounts of time-series data |
Дата | |
Msg-id | 407d949e0908261342o7d45978cqa8fa54e96b3bc5d6@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Performance issues with large amounts of time-series data (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-performance |
2009/8/26 Tom Lane <tgl@sss.pgh.pa.us>: >> How does a float ("REAL") compare in terms of SUM()s ? > > Casting to float or float8 is certainly a useful alternative if you > don't mind the potential for roundoff error. On any non-ancient > platform those will be considerably faster than numeric. BTW, > I think that 8.4 might be noticeably faster than 8.3 for summing > floats, because of the switch to pass-by-value for them. It occurs to me we could build a special case state variable which contains a bigint or a numeric only if it actually overflows. This would be like my other suggestion with dates only it would never be exposed. The final function would always convert to a numeric. Alternatively we could change the numeric data type as was proposed aeons ago but make it more general so it stores integers that fit in a bigint as a 64-bit integer internally. That would be more work but be more generally useful. I'm not sure it would be possible to avoid generating palloc garbage for sum() that way though. -- greg http://mit.edu/~gsstark/resume.pdf
В списке pgsql-performance по дате отправления: