Timeline for Is there a fast way to change column type without dropping the clustered index?
Current License: CC BY-SA 3.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 15, 2018 at 18:44 | history | edited | Aaron Bertrand |
edited tags
|
|
May 17, 2013 at 8:07 | history | tweeted | twitter.com/#!/StackDBAs/status/335305538441211904 | ||
May 16, 2013 at 22:56 | comment | added | Aaron Bertrand | Smallint is <= 32767. Would take longer than your lifetime to use those up. | |
May 16, 2013 at 22:54 | comment | added | dsum | @AaronBertrand I think my team also joked about using smallint, it would be like the millennium bug we had back in yr 2000. Using a actual date type (3 bytes) is a good option, but this type was only introduced in SQL 2008, and back then we had to support Oracle as well. | |
May 16, 2013 at 22:43 | comment | added | Aaron Bertrand | One key per day? You could store 90+ years in a smallint. Or you could use an actual date (how novel!) and use 3 bytes plus have validation and everything else that comes with the right data type. | |
May 16, 2013 at 22:32 | vote | accept | dsum | ||
May 16, 2013 at 22:24 | history | edited | dsum | CC BY-SA 3.0 |
added 321 characters in body
|
May 16, 2013 at 22:17 | comment | added | dsum | @Kenneth, the column is a date dimension key and we are pretty sure we don't need an bigint to store 365 days/year worth of data. I probably won't be alive before we ran out of just int data type. :) | |
May 16, 2013 at 22:13 | answer | added | Aaron Bertrand | timeline score: 3 | |
May 16, 2013 at 21:59 | comment | added | Kenneth Fisher | My first question would be does your data have values that are beyond an int. If so then don't even try the change it won't work. | |
May 16, 2013 at 21:43 | history | edited | András Váczi | CC BY-SA 3.0 |
edited title
|
May 16, 2013 at 21:35 | answer | added | Kin Shah | timeline score: 1 | |
May 16, 2013 at 21:26 | comment | added | user1822 | How do you know it will improve performance? I doubt that you can really measure the difference. | |
May 16, 2013 at 21:03 | history | asked | dsum | CC BY-SA 3.0 |