principlesqlMinor
SQL Server BigInt vs Decimal
Viewed 0 times
sqldecimalbigintserver
Problem
I need to choose a data type for SQL Server( BigInt vs Decimal) on the basis of performance and querying (10 digit number)
Solution
If you don't need fractions, choose bigint. In your case it will be a byte smaller:
10 digit decimal is 9 byte: https://msdn.microsoft.com/it-it/library/ms187746.aspx
bigint is 8 byte: https://msdn.microsoft.com/it-it/library/ms187745.aspx
Plus, it is faster (it has no variable part, and it is an integer type, much faster processed by cpu).
10 digit decimal is 9 byte: https://msdn.microsoft.com/it-it/library/ms187746.aspx
bigint is 8 byte: https://msdn.microsoft.com/it-it/library/ms187745.aspx
Plus, it is faster (it has no variable part, and it is an integer type, much faster processed by cpu).
Context
StackExchange Database Administrators Q#102953, answer score: 7
Revisions (0)
No revisions yet.