Skip to content

Instantly share code, notes, and snippets.

View hamid67fathi's full-sized avatar
🎯
Focusing

Hamid Fathi hamid67fathi

🎯
Focusing
View GitHub Profile
<?xml version="1.0" encoding="utf-16"?>
<ShowPlanXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="1.2" Build="12.0.4100.1" xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan">
<BatchSequence>
<Batch>
<Statements>
<StmtSimple StatementCompId="1" StatementEstRows="100" StatementId="1" StatementOptmLevel="FULL" CardinalityEstimationModelVersion="120" StatementSubTreeCost="29.3247" StatementText="select top(100)&#xD;&#xA; Batch_Tasks_Queue.id,&#xD;&#xA; btq.id&#xD;&#xA;from&#xD;&#xA; Batch_Tasks_Queue with(nolock)&#xD;&#xA; inner join Batch_Tasks_Queue btq with(nolock) on Batch_Tasks_Queue.Start_Time &lt; btq.Start_Time&#xD;&#xA; and btq.Start_Time &lt; Batch_Tasks_Queue.Finish_Time&#xD;&#xA; and Batch_Tasks_Queue.id &lt;&gt; btq.id &#xD;&#xA; and btq.Start_Time is not null&#xD;&#xA;
<?xml version="1.0" encoding="utf-16"?>
<ShowPlanXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="1.2" Build="12.0.4100.1" xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan">
<BatchSequence>
<Batch>
<Statements>
<StmtSimple StatementCompId="1" StatementEstRows="100" StatementId="1" StatementOptmLevel="FULL" CardinalityEstimationModelVersion="120" StatementSubTreeCost="201.393" StatementText="select top(100)&#xD;&#xA; Batch_Tasks_Queue.id,&#xD;&#xA; btq.id,&#xD;&#xA; Batch_Tasks_Queue.[Parameters], -- this field&#xD;&#xA; btq.[Parameters] -- and this field&#xD;&#xA;from&#xD;&#xA; Batch_Tasks_Queue with(nolock)&#xD;&#xA; inner join Batch_Tasks_Queue btq with(nolock) on Batch_Tasks_Queue.Start_Time &lt; btq.Start_Time&#xD;&#xA; and btq.Start_Time &lt; Batch_Tasks_Queue.Finish_Time&#xD;&#xA; and Batch_Tasks_Queue.id &lt;&gt; btq.id