Execution Plan

TraceExecution Plan

SELECT [Extent1].[Id] AS [Id], [Extent1].[Notional] AS [Notional], [Extent1].[ParticipationRate] AS [ParticipationRate], [Extent1].[TradingPeriod] AS [TradingPeriod], [Extent1].[HoldingPeriod] AS [HoldingPeriod], [Extent1].[Type] AS [Type], [Extent1].[ExitTime] AS [ExitTime], [Extent1].[IsHoldingPeriodHours] AS [IsHoldingPeriodHours], [Extent1].[Return] AS [Return] FROM [dbo].[IdeaExitScenarios] AS [Extent1] WITH(READCOMMITTED) WHERE [Extent1].[Id] = @EntityKeyValue

============================================================================
DECLARE @EntityKeyValue uniqueidentifier

DECLARE CrrOpt CURSOR FOR SELECT ID from dbo.IdeaExitScenarios with(NOLOCK)
OPEN CrrOpt
FETCH NEXT FROM CrrOpt INTO @EntityKeyValue
WHILE @@Fetch_Status = 0
BEGIN
SELECT [Extent1].[Id] AS [Id], [Extent1].[Notional] AS [Notional], [Extent1].[ParticipationRate] AS [ParticipationRate], [Extent1].[TradingPeriod] AS [TradingPeriod], [Extent1].[HoldingPeriod] AS [HoldingPeriod], [Extent1].[Type] AS [Type], [Extent1].[ExitTime] AS [ExitTime], [Extent1].[IsHoldingPeriodHours] AS [IsHoldingPeriodHours], [Extent1].[Return] AS [Return] FROM [dbo].[IdeaExitScenarios] AS [Extent1] WITH(READCOMMITTED) WHERE [Extent1].[Id] = @EntityKeyValue
FETCH NEXT FROM CrrOpt INTO @EntityKeyValue
END
close CrrOpt
deallocate Crropt
GO
============================================================================

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s