????SQL?????á???????????????
???????????? ???????[ 2013/4/22 11:39:08 ] ????????
????3????????????????????????where????????like??????????????????????????ctrl+alt+a????????????????????????????????
????4??????????Optimize for Ad hoc Workloads???1??
EXEC sp_configure 'optimize for ad hoc workloads'?? 1
RECONFIGURE
GO
????5?????????????棺
DBCC FREEPROCCACHE
GO
????6???????????
USE AdventureWorks
GO
SELECT *
FROM Sales.SalesOrderDetail
WHERE SalesOrderDetailID = 43659
GO
????7?????????????????????????μ???????
SELECT CP.usecounts AS CountOfQueryExecution ??
CP.cacheobjtype AS CacheObjectType ??
CP.objtype AS ObjectType ??
ST.text AS QueryText
FROM sys.dm_exec_cached_plans AS CP
CROSS APPLY sys.dm_exec_sql_text(plan_handle) AS ST
WHERE CP.usecounts > 0
AND ST.text LIKE '%SELECT * FROM Sales.SalesOrderDetail WHERE SalesOrderDetailID = 43659 %'
AND CP.cacheobjtype = 'Compiled Plan'
GO
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11