Posts Tagged ‘WebCast’

How to Use Parameters Like a Pro and Boost Performance by Guy Glantser

10. Mai 2017

Thema

Parameters are a fundamental part of T-SQL programming, whether they are used in stored procedures, in dynamic statements or in ad-hoc queries. Although widely used, most people aren’t aware of the crucial influence they have on query performance. In fact, wrong use of parameters is one of the common reasons for poor application performance.

Sprecher

Guy Glantser

Links

http://www.madeiradata.com/tag/parameterization-series

Notizen

Abfrage von PlanCacheDaten:

SELECT
    BatchText            = BatchTexts.text ,
    QueryPlan            = BatchPlans.query_plan ,
    ExecutionCount        = CachedPlans.usecounts ,
    ObjectType            = CachedPlans.objtype ,
    Size_KB                = CachedPlans.size_in_bytes / 1024
FROM
    sys.dm_exec_cached_plans AS CachedPlans
CROSS APPLY
    sys.dm_exec_query_plan (plan_handle) AS BatchPlans
CROSS APPLY
    sys.dm_exec_sql_text (plan_handle) AS BatchTexts;
Advertisements