August 14, 2015 at 8:39 am
Hello friends
I found table spool(Lazy) in execution plan so it is better or not?
let me know if it is not good then how to avoid it?
August 14, 2015 at 10:14 am
meerack11 (8/14/2015)
Hello friendsI found table spool(Lazy) in execution plan so it is better or not?
let me know if it is not good then how to avoid it?
It depends on what the statement is doing. Folks will be guessing without sight of the actual query plan.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 14, 2015 at 10:31 am
Further on Chris's reply, this is a high level representation of what goes on behind the scene when a query is executed, it can be good, bad or ugly but it all depends, without more complete information it's a waste of time trying to guess.
๐
Best thing you can do to get an answer to your question is to post the actual execution plan, the DDL (create table including indices etc.) and at least some information on the data (cardinality etc.)
August 14, 2015 at 11:27 am
Select distinct SCode, Spec from CLEANSED_DATA
where State ='NC' and Application_Header_ID=82 and Ntwk_ID='NCN201' and File_Type='Provider'
and SCode not in
(select Spec_Code from vw_Geo
where State='NC' and File_Type='Provider' and
Application_Header_ID=82 and NetworkID='N201'
)
and I have also question like what is better multiple non cluster index pr multiple column non cluster index?
August 14, 2015 at 4:18 pm
Seconding Chris's request to see the execution plan. The query alone is not very useful.
As for indexes: http://sqlinthewild.co.za/index.php/2010/09/14/one-wide-index-or-multiple-narrow-indexes/
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
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply