The forum will be down for maintenance over the weekend of August 18-20, 2017. The forum will be shut down on the evening (EDT) of Friday, August 18. Downtime is unknown but may be up to two days. The forum will be restarted as soon as maintenance is complete.

According to the docs - and as discussed here - , an ALTER TABLE that changes the datatype of a column will enforce a re-calculation of all computed columns of that table.

I would usually try to put several modifications like changing several columns in one single ALTER TABLE statement.

What implications does that have for the re-calculation:

  • Will this trigger only one single re-calculation (i.e. the changes are made then one re-calculation takes place)?
  • Or will each alteration trigger a separate run, possibly causing several rewrites of the same row?
  • And what if among other modifications, the datatype of a computed column is altered, too? Does this lead to another re-calculation?

(In my current case, the re-calculation won't change the contents, and as such it's merely a question of performance; however, in other circumstances it might matter more...)

asked 14 Jan '11, 14:25

Volker%20Barth's gravatar image

Volker Barth
30.9k311457668
accept rate: 32%

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×11
×6

question asked: 14 Jan '11, 14:25

question was seen: 1,248 times

last updated: 14 Jan '11, 14:25