Quantcast
Channel: SQLServerCentral » Data Warehousing » Analysis Services » Latest topics
Viewing all articles
Browse latest Browse all 1341

Fact Table Measure Data Types (Float vs Decimal)

$
0
0
This is from "Expert Cube Development with SSAS Multidimensional Models" (Webb, Chris; Ferrari, Alberto; Russo, Marco)[quote]When we design data marts, we need to be aware that Analysis Services does not treat all data types the same way. The cube will be much faster, for both processing and querying, if we use the right data type for each column. ...[For] Numeric measures use smallmoney, money, real, and float (Note that decimal and vardecimal require more CPU power to process than money and float types)[/quote]Yet in Pro SQL Server 2012 BI Solutions (Apress: Randal Root and Caryn Mason)[quote]Another common feature of the fact table is the simplification of datatypes. The actual sales price may have originally been recorded as a SQL Server money datatype, yet the fact table would represent this data as decimal(18, 4), ... The reason for this change is that SQL Server’s money type is a custom datatype associated with Microsoft’s SQL Server.Money is not an industry-standard datatype, but the decimal datatype is indeed an industry standard. The moneydatatype can be accurately represented by this decimal datatype; thus, it is logical to do so. Applications that usethe data warehouse are more likely to work correctly using a standard datatype than a custom datatype.[/quote]Additionally, the Decimal type is faster than float when comparing in a where clause.What do other developers use? Why?

Viewing all articles
Browse latest Browse all 1341

Trending Articles