在这个问题中,它是参数嗅探吗?有一个与 XML 附带的执行计划。
为什么ParameterCompiledValue
执行计划的 XML 中缺少内容?
<ParameterList>
<ColumnReference Column="@__trailerLocation_SbtAssetid_12" ParameterDataType="nvarchar(12)" ParameterRuntimeValue="N'9511'" />
<ColumnReference Column="@__trailerLocation_SbtAssetid_11" ParameterDataType="nvarchar(12)" ParameterRuntimeValue="N'8184'" />
<ColumnReference Column="@__trailerLocation_SbtAssetid_10" ParameterDataType="nvarchar(12)" ParameterRuntimeValue="N'9628'" />
<ColumnReference Column="@__trailerLocation_SbtAssetid_9" ParameterDataType="nvarchar(12)" ParameterRuntimeValue="N'9683'" />
<ColumnReference Column="@__trailerLocation_SbtAssetid_8" ParameterDataType="nvarchar(12)" ParameterRuntimeValue="N'9234'" />
<ColumnReference Column="@__trailerLocation_SbtAssetid_7" ParameterDataType="nvarchar(12)" ParameterRuntimeValue="N'9204'" />
<ColumnReference Column="@__trailerLocation_SbtAssetid_6" ParameterDataType="nvarchar(12)" ParameterRuntimeValue="N'9628'" />
<ColumnReference Column="@__trailerLocation_SbtAssetid_5" ParameterDataType="nvarchar(12)" ParameterRuntimeValue="N'9852'" />
<ColumnReference Column="@__trailerLocation_SbtAssetid_4" ParameterDataType="nvarchar(12)" ParameterRuntimeValue="N'5842'" />
<ColumnReference Column="@__trailerLocation_SbtAssetid_3" ParameterDataType="nvarchar(12)" ParameterRuntimeValue="N'4138'" />
<ColumnReference Column="@__trailerLocation_SbtAssetid_2" ParameterDataType="nvarchar(12)" ParameterRuntimeValue="N'7505'" />
<ColumnReference Column="@__trailerLocation_SbtAssetid_1" ParameterDataType="nvarchar(12)" ParameterRuntimeValue="N'7826'" />
<ColumnReference Column="@__trailerLocation_SbtAssetid_0" ParameterDataType="nvarchar(12)" ParameterRuntimeValue="N'8604'" />
</ParameterList>
我希望XML 中同时存在ParameterCompiledValue
和,就像这个例子一样。ParameterRuntimeValue
<ParameterList>
<ColumnReference Column="@contactPersonID" ParameterDataType="int" ParameterCompiledValue="(1025)" ParameterRuntimeValue="(1025)" />
</ParameterList>