From a performance standpoint, the system only really needs to have
numeric values in packed format in order to do math. So, if storage
limitations is not a big issue, I don't see any reason for keeping numeric
values in a database in packed format unless math is an issue.
Also, I've seen some mention of packing numbers that have decimal
positions, but this makes no real sense to me either. A number is a
number and having decimal positions or not seems irrelevant to me.
Rich Loeber - @richloeber
Kisco Information Systems
[1]
http://www.kisco.com
SDG
--------------------------------------------------------------------------
On 9/2/2011 8:01 AM, Joe Pluta wrote:
Generally speaking, what is the current wisdom about storing numeric
data in the database? Do folks still prefer packed representation for
data with decimal positions? Zoned is a little easier on the eyes when
looking at a raw record, but it takes a few more bytes especially as the
fields get larger. And as far as I know RPG still likes to convert
things to packed when it reads a file unless you tell it not to. That
being the case is there still a performance issue these days?
We like zoned fields here, but I'm trying to address the issue from a
thorough technical standpoint. If you're trying to be as lean as
possible, you could argue that integers should be stored in binary,
although that has its own issues. Heck, an argument could be made that
you should store all data as integers with implied digits and decimal
positions.
What say you all?
Joe
References
Visible links
1.
http://www.kisco.com/
As an Amazon Associate we earn from qualifying purchases.