我有一个存储少于3个寄存器的表,但是查询非常慢。
此表只有一个主键,其碎片为0%。
> DBCC SHOWCONTIG scanning 'MYTABLE' table... TABLE level scan performed.
- Pages Scanned................................: 1
- Extents Scanned..............................: 1
- Extent Switches..............................: 0
- Avg. Pages per Extent........................: 1.0
- Scan Density [Best Count:Actual Count].......: 100.00% [1:1]
- Logical Scan Fragmentation ..................: 0.00%
- Extent Scan Fragmentation ...................: 0.00%
- Avg. Bytes Free per Page.....................: 7930.0
- Avg. Page Density (full).....................: 2.03%发布于 2015-06-22 20:51:41
如果多个线程同时发出delete/update/select语句,那么阻塞是最有可能的解释。您可以使用SQL并像'%MYTABLE%‘一样在TextData上筛选跟踪,以查找访问该表的所有语句。
https://stackoverflow.com/questions/4076516/how-to-profile-for-one-table-in-sql-server
但是,在生产环境中小心使用server,它可能会影响整个服务器性能。
https://dba.stackexchange.com/questions/104756
复制相似问题