FIX: ALTER TABLE ADD PK May Take a Long Time Even With No Data

ID: Q159848


The information in this article applies to:

BUG #: 15900 ()

SYMPTOMS

If there are thousands of tables with hundreds of columns each, the ALTER TABLE ADD PK command may take a long time, even if there is no data in the table.


MORE INFORMATION

ALTER TABLE ADD PK searches syscolumns several times and scans the tables. With thousands of wide tables, it may take a full minute to add a PK to an empty table.


STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.5. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server version 6.5. For more information, contact your primary support provider.


Keywords          : kbprg SSrvTran_SQL kbbug6.50 kbfix6.50.sp2 
Version           : 6.5
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: April 4, 1999