????SQL?????á???????????????
???????????? ???????[ 2013/4/22 11:39:08 ] ????????
????????
????????????в??????洢?????????????м?????洢??SQLServer????????????С?????????????????Щ????????????????Σ??????Щ????????洢??????????????????????????治?????????????????????????????????2005???????????????????????????????????SQLServer 2008????????????????????????????????????2012???????á???????????????
????????????????????????????к?????????????е???????????????????????????У???????????????????????????????????????
?????????????
???????????????????????????棬?????м?????????????????????
????1????????ж????????????????У?
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
GO
??????????£?
????2??????????????
DBCC FREEPROCCACHE
GO
????3????????????????????????????в???1?е????
???????裺
????1????????????
USE AdventureWorks
GO
SELECT *
FROM Sales.SalesOrderDetail
WHERE SalesOrderDetailID = 43659
GO
????2?????????????????????????м?????棬??????????????????????
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
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