摘要:
转摘:https://jingyan.baidu.com/article/e75057f2c413e8ebc91a89b0.html 1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索 2.应尽量避免在 where 子句中对字段进行 null 值 阅读全文
摘要:
SELECT request_session_id spid, OBJECT_NAME( resource_associated_entity_id ) tableName FROM sys.dm_tran_locks WHERE resource_type = 'OBJECT' ORDER BY request_session_id ASC 阅读全文