question

Fatherjack avatar image
Fatherjack asked

Data type explanation

The sysjobhistory table in MSDB has a column called run_duration. It is an INT data type. It's description is "Elapsed time in the execution of the job or step in HHMMSS format." Can someone please explain the benefits of this over storing it as a TIME type? I can see it will save space INT being smaller on disk than TIME and that *may* be a factor on a busy server but it's a real pain to convert back to time to work out averages etc....
msdbdata-type
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Grant Fritchey avatar image Grant Fritchey ♦♦ commented ·
Nope. You got me. I haven't a clue.
2 Likes 2 ·
Kev Riley avatar image
Kev Riley answered
Guess it is for 'historical reasons' - raise it on Connect and I'll vote!
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Kev Riley avatar image Kev Riley ♦♦ commented ·
Voted! Now everyone else please!
2 Likes 2 ·
WilliamD avatar image
WilliamD answered
The benefit is no-one in Redmond has to refactor and test all MS code that touches this table - time and money saved right there! ;)
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sp_lock avatar image sp_lock commented ·
Owtch... Below the belt ;-)
0 Likes 0 ·
WilliamD avatar image WilliamD commented ·
Not at all IMO - MS is a business after all! Just check out connect and the "closed - not going to fix" entries!
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.