My boss is convinced that you should never delete columns from a table in production (something about it could mess up index’s). Over the years this ‘practice’ has resulted in many of our tables becoming bloated with hundreds of unused, legacy columns.
Aside from having to refactor our (generated) datalayer, are there any solid reasons not to remove a unused column from a table? Is my boss correct that it could break and index or have other side effects?
Well… I started thinking about it and I came up with an issue not mentioned above. Deleting Columns could potentially break views, functions and stored procedures if the columns are directly referenced by the queries. In a well maintained/optimized system this would likely not be an issue (if it is truly not being used then it shouldn’t be referenced anywhere).