Advantage of using byte over Long Integer?

J

J P Hill

I'm using an Access DB to do a series of calculations. Most of the
data are stored as doubles to maximise accuracy. However, the Year
and Month (which are only used for referencing) are stored as Long
Integers. Am I likely to achieve any increase in performance by
changing month (i.e. 1 - 12) to Byte and year to Integer?
 
R

Rick Brandt

J said:
I'm using an Access DB to do a series of calculations. Most of the
data are stored as doubles to maximise accuracy. However, the Year
and Month (which are only used for referencing) are stored as Long
Integers. Am I likely to achieve any increase in performance by
changing month (i.e. 1 - 12) to Byte and year to Integer?

No.

There is validity to the standard of using the DataType that is large enough for
the job, but no larger, but unless you get into the huge number crunching tasks
normally assigned to "Big Blue" you are not likely to see any difference.

If you set up a test loop and did enough iterations a difference might show up,
but as far as something that your users would notice I would say there's almost
no chance of that.
 
T

Tim Ferguson

(e-mail address removed) (J P Hill) wrote in
However, the Year
and Month (which are only used for referencing) are stored as Long
Integers. Am I likely to achieve any increase in performance by
changing month (i.e. 1 - 12) to Byte and year to Integer?

I'm with Rick on this; but I would add that you might like to think of
combining these two fields into one (say, Year *12 + Month). This would
make all kinds of ordering and grouping easier, as well as simplify
validation. The UI would take a little more work but I guess it would
probably pay off.

Just a thought...


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top