Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7776741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:57:23+00:00 2026-06-01T17:57:23+00:00

I have a database table that holds customer data with several million rows in

  • 0

I have a database table that holds customer data with several million rows in it, and need do modify the lastname field from NVARCHAR(32) to NVARCHAR(50). The field has an index on it (non-clustered). I need to know whether making this change with an ALTER TABLE ALTER COLUMN statement will automatically rebuild the index.

If so, I think that would take quite a bit of time. Our upgrade process in production is done via a released installer that runs scripts, and we need to give an expectation of how long the upgrade will take. We have sizable DBs in production on both SQL 2005 and 2008, so I need to know the answer for both if it’s different.

I know that increasing the size of the columns shouldn’t modify the data in a variable length field like NVARCHAR, and should be very quick even on large data sets in a situation where there’s no index involved. What I’m not clear on is whether an index will cause this to be much slower.

I read the documentation at the link below, but it really just indicates that you can make the change with an existing index, and doesn’t specify what impact that might have to the execution time of the ALTER TABLE statement, or whether the index has to be rebuilt afterwards, or is done automatically, etc.

http://msdn.microsoft.com/en-us/library/ms190273.aspx

The question at the link below is really almost the same thing I’m asking here, but there’s no satisfactory answer on this other post, so I thought I’d try a new post.

SQL Server 2005 Index rebuild when increasing the size of a varchar field

Please let me know if you have had experience with this. If I can get a test system set up with a sizable DB where I can experiment, I’ll post the results.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:57:24+00:00Added an answer on June 1, 2026 at 5:57 pm

    No – Indexes are never automatically rebuilt in SQL Server, even when you change a column size such as the nvarchar column mentioned. Indexes are maintained automatically but not rebuilt. Statistics / internal histogram of the data may be automatically updated if the DB Option ‘auto update statistics’ is set.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database table with a field that I need to read from
I have a table in my database that holds numerical values collected from a
I have a large database table that I need to display on a Windows
I have a database two tables and a linking table that I need a
I have a database table that holds information for received files. One of the
I've created a database with a table (customer table) that holds basic customer information
I have a database table that holds the following grade information for a student:
I happen to have a database with a table that holds all possible combination
I have some database table and need to process records from it 5 at
I have a MySql database that holds datetime in one field, in this format:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.