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.0k294448654
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,202 times

last updated: 14 Jan '11, 14:25