What “Clustered Index Scan (Clustered)” means on SQL Server execution plan?

前端 未结 5 1976
我在风中等你
我在风中等你 2021-02-02 07:52

I have a query that fails to execute with \"Could not allocate a new page for database \'TEMPDB\' because of insufficient disk space in filegroup \'DEFAULT\'\".

On the

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-02 08:49

    I have been having issues with performance and timeouts due to a clustered index scan. However another seemingly identical database did not have the same issue. Turns out the COMPATIBILITY_LEVEL flag on the db was different... the version with COMPATIBILITY_LEVEL 100 was using the scan, the db with level 130 wasn't. Performance difference is huge (from more than 1 minute to less that 1 second for same query)

    ALTER DATABASE [mydb] SET COMPATIBILITY_LEVEL = 130

提交回复
热议问题