mercredi 4 mars 2015

Trying to add a NULLable column to a table with over 90 million rows takes a very long time


I have been trying to add a NULLable column to a table with over 90 million rows.



ALTER TABLE <TableName> ADD <FieldName> INT NULL;


It is taking a very long time (been running for over 20 mins now). The Wait stats show LCK_M_SCH_M locks blocked by ASYNC_NETWORK_IO locks. No Default constraints being added. Would think this shouldn't take this long.


I am new to the DBA world. Would appreciate if someone could tell me why this would be a problem ? Is this related to network latency / SAN issues ? I would like to know how I can prove this to the SysOps folks.





Aucun commentaire:

Enregistrer un commentaire