August 28, 2016 at 1:31 am
Experts,
Which is better ? A Clustered Index scan or Index Seek + Key lookup on clustered index.
Seek Keys[1]: Prefix: [PROD].[dbo].[Alankar].OId = Scalar Operator([PROD].[dbo].[Alankar].[OId] as [DO].[OId])
August 28, 2016 at 1:58 am
Depends on the table size and number of rows needing a lookup. Test for your data set and see which works better for you.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 28, 2016 at 2:42 am
GilaMonster (8/28/2016)
Depends on the table size and number of rows needing a lookup. Test for your data set and see which works better for you.
Thanks Gail.
For large data scan is better and is its less then Seek + Key lookup is fine right? Please correct me if I am wrong.
August 28, 2016 at 1:27 pm
It depends both on the total size of the table, and on the number of rows needing a lookup.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 29, 2016 at 7:53 am
VastSQL (8/28/2016)
GilaMonster (8/28/2016)
Depends on the table size and number of rows needing a lookup. Test for your data set and see which works better for you.Thanks Gail.
For large data scan is better and is its less then Seek + Key lookup is fine right? Please correct me if I am wrong.
As Gail said, it depends. The only way to know is to test it insitu.
--Jeff Moden
Change is inevitable... Change for the better is not.
August 29, 2016 at 8:00 am
Define "better".
"Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply