Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Types/Performences

Status
Not open for further replies.

ParyGoal

MIS
Jul 22, 2006
70
US
I have a question regarding the best and most effective way of storing database field.

I have several fields that are going to store decimal values with a max scale of 3.

I know that fields such as decimal and memo use a lot of space.
Should I define those fields are text and save them from the program as decimal values? If so, how do I go about making sure the users enter decimal values in those fields and not text?

Thank you

ParyGoal
 
Processing text is about as slow and inefficient as it gets. Processing almost any type of numeric data will be faster and more efficient. Alternatively you could e.g. store a value of 10.3 as 103 on disk in order to use an integer rather than a single and then divide by 10 everytime you retrieve the value but frankly its just not worth the bother/ headache.

Such techniques may have been justified in bygone days when processing speed, disk space and memory were very precious but now it is just not worth it.

regards Hugh
 
Thank you HughLerwill for your response.
It makes sense to me now.

Thank you

ParyGoal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top