Hi all!
I have multiple custom entities I'm building with lots of custom fields that are numbers. My question is: in the long run, is there a benefit to storing as many numbers as I can as whole numbers instead of decimal numbers? Especially if I'm going to have >10,000 records in an entity in the future? Eg: Creating a custom field called "Distance from School" in a custom entity called "Student" and storing a student's distance from school as 1250 meters (whole number) instead of 1.25 kilometers (decimal number)?
My thinking is that whole numbers are stored as fixed-point numbers while the decimal numbers are stored as floating-point, and therefore in the long run (when I have tens-of-thousands of records in an entity) it would make sense to have as many fixed-point variables as possible to keep the speed of processing/fetching data/calculations as quick as possible.
Thanks!
Thank you both for your answers! The custom fields I am making will go to a known number of decimal points in the metric system, so what I did is just make the units for those fields small enough that the fields were always whole numbers. Eg; I know that I will only go to 2 decimal places in my "Distance from School" field if the units are kilometers, so I made the units meters and stored the numbers as whole numbers.
I understand that the benefits could be negligible, but since I know for a fact the max decimal places I will need (thanks to industry standards) I figured that saving a little bit of processing power with each field will be worth it when I have 10,000 or even 100,000 records of each of my 50 or so different custom fields.
Thanks again!
I agree with Eric that the performance difference is negligible, and you have better future-proofing with decimal numbers.
One extra point, decimal numbers are not stored as floating point numbers, but as decimal numbers (which actually take up more space than floating point numbers). There is additionally the option to create fields as a floating point number
Hi @Anonymous,
Unless I know 100% that I don’t need decimal places, I would go for decimal fields instead of whole number for future proofing and flexibility. The performance between whole and decimal numbers are negligible so I wouldn’t base my whole/decimal number decision making on that but rather on the requirements and flexibility of the system because once you create a field you can’t change the data type. Hope this helps...
Just a quick follow-up:
Let's say storing as a whole number does benefit overall speed in the long run. If I stored "Distance from School" as a whole number (1250 m) and then wanted to then link the data to Power BI and display it as a decimal (1.25 km,) would doing that calculation end up negating the benefits of storing as a whole number instead of a decimal?
Thanks!
ankit_singhal
11
Super User 2025 Season 1
mmbr1606
9
Super User 2025 Season 1
CU07050602-0
4