Reputation
247
Top tag
Next privilege 250 Rep.
View close votes
Badges
1 5 13
Newest
 Constituent
Impact
~27k people reached

  • 0 posts edited
  • 0 helpful flags
  • 16 votes cast
Aug
5
awarded  Constituent
Aug
5
awarded  Caucus
Feb
12
accepted SQL Server Decimal(9, 0) vs INT
Feb
12
awarded  Nice Question
Sep
6
awarded  Notable Question
Aug
21
awarded  Notable Question
Apr
16
awarded  Famous Question
Dec
18
accepted Enforce Schema-bound views
Dec
16
awarded  Yearling
Dec
12
asked Enforce Schema-bound views
Oct
26
awarded  Popular Question
Oct
24
suggested rejected edit on SQL Server Decimal(9, 0) vs INT
Oct
24
comment SQL Server Decimal(9, 0) vs INT
I think SQL Server optimizes something there indeed. Despite the optimization DECIMAL still takes usually somewhat longer (at least on my development system). In a run of 10 tests around 51 ms DEC vs. 46 ms INT.
Oct
14
comment SQL Server Decimal(9, 0) vs INT
@AndriyM, I think this is the greatest benefit. Rephrase it into an answer instead of a comment and I'll mark it as answer.
Oct
5
comment SQL Server Decimal(9, 0) vs INT
Your answer makes sense, but a processor doesn't have any knowledge of datatypes. So one datatype of 4 bytes, is compared just as fast as another datatype of 4 bytes. Can you show (with a repeatable performance test, for example) that there's a performance hit in using DECIMAL(9, 0) instead of an INT?
May
27
awarded  Caucus
Apr
29
awarded  Popular Question
Oct
17
awarded  Notable Question
Sep
14
revised Running an SSIS package owned by a domain user from SQL Server running on a local service account
Update in response to several proposed answers
Sep
14
comment Running an SSIS package owned by a domain user from SQL Server running on a local service account
@Justicator: Maybe, as a last resort. But whenever domain logins are possible, I prefer not to use SQL Authentication.