Request for drop/add vs. table rebuild on computed columns
Jason Hannas
Posts: 41 Bronze 3
It seems to me that computed columns are fairly easily identified. If they are the only things changing in a table synchronization, then why can't they simply be dropped and added (accounting for index and constraint dependencies, of course) rather than forcing a table rebuild?
We make fairly extensive use of computed columns--particularly for accounting systems. I'm not comfortable syncing tables when those column definitions change, because of the full table rebuild which can be quite time consuming on the larger tables.
Drop/add is painless, takes very little time, and works with persisted computed columns in the same manner. It would really save me time when syncing my various environments.
We make fairly extensive use of computed columns--particularly for accounting systems. I'm not comfortable syncing tables when those column definitions change, because of the full table rebuild which can be quite time consuming on the larger tables.
Drop/add is painless, takes very little time, and works with persisted computed columns in the same manner. It would really save me time when syncing my various environments.
Comments
SQL Compare will in most circumstances attempt to alter an existing table when synchronizing a database.
This LINK is to a knowledge base article explains the circumstances as why SQL Compare will rebuild a table.
I hope this article answers your question.
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com
Thanks for your reply.
Jason
I suspect that SQL Compare treats persisted computed columns as if they are actual table columns. So rather treat them as a special case, it is easier for SQL Compare to perform the rebuild instead of the drop / add.
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com