为了确定数据库中的哪些表具有页面级锁定以及需要修改为行级别锁定,我使用了一段sql脚本:genlockmod . sql(参见清单1)。
To determine which tables in a database have page-level locking and need to be modified to row-level locking, I use a helpful SQL script: genlockmod.sql (see Listing 1).
尤其是有一两千万行数据的时候,每次修改模式、往数据库中添加索引都会数小时完全锁定数据库。
In particular, making schema changes or adding indexes to a database with more than 10-20 million rows completely locks the database for hours at a time.
应用推荐