When MSSQL has a large amount of data, you can create an index or add a field and save the Change Prompt timeout.

Source: Internet
Author: User

Generally, we all like to use the UI of the Database Manager to change the structure of the data table, and then naturally place the "save" button to save, but when the data volume is large, in this case, you will often see "you cannot create an index" IX _ index name ". The timeout has reached. The timeout has expired or the server has not responded before the operation is completed. "This error. At a moment, I am at a loss.
Copy codeThe Code is as follows:
After modifying the table attributes, use the "index/Key" dialog box to create an index for a large table (with 13,239,473 million records). The following message is displayed:

-The Index "IX_TableName" cannot be created ".
The timeout has reached. The timeout has expired or the server has not responded before the operation is completed.

After the change script is generated, it takes 12 minutes to complete the execution in "Database Engine Query.

How is the timeout in the "index/Key" dialog box determined? What are the differences between the two methods for operations performed on the local machine? Wondering ......

Later comments gave me guidance. Thank you!

It is very easy to sort out the specific practices, but when no one taught me to do so, I can only stare at it:

When you change the data structure of a table with a large amount of data, do not click the "save" button. Instead, right-click the "generate change script" button on the left side of the table structure editing box and select "generate change script ", in the displayed text dialog box, select and copy all the content, close the table, choose not to save, right-click the database to which the table belongs, and select "new query ", then press Ctrl + V to paste the copied script and run it. In this way, no timeout prompt will be displayed. If the data volume is large, we only need to wait patiently!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.