Execution Plan/ Client Statistics

The Execution Plan/ Client Statistics for this query prior to indexing is shown on the attached image:
select s.[year], a.AnalyteCode, a.Analyte
, Min(a.ConcentrationLevel) as min_Concentration_Level
, Max(a.ConcentrationLevel) as max_Concentration_Level
, a.ConcentrationLevelUnit as Concentration_Unit
from LabAnalyteData as a inner join 
LabSampleData as s on s.IDinAccess= a.IDinAccess
Group By s.[year], a.AnalyteCode, a.Analyte, a.ConcentrationLevelUnit
Order By a.Analyte

Open in new window

On this image, under Execution Plan tab, there is indexing recommendation in green.
Question 1: Is there a way to copy and paste the string of this recommendation?

The list of missing non-clustered indexes are:
- a.IDinAccess  (FK)
- Include a.AnalyteCode, a.Analyte, a.ConcentrationLevelUnit

Question 2: What exactly does the above recommendation mean? Which of the following it is recommending:

CREATE INDEX index_FK_IDinAccess_LabAnalyteData ONLabAnalyteData (IDinAccess);    
CREATE INDEX index_FK_Fields_LabAnalyteData ONLabAnalyteData (AnalyteCode, Analyte, ConcentrationLevelUnit);

or:

CREATE INDEX index_FK_IDinAccess_LabAnalyteData ONLabAnalyteData (IDinAccess, AnalyteCode, Analyte, ConcentrationLevelUnit);

Question 3: What red flags do you see on the Execution Plan/ Client Statistics tabs?
IndexAnalizer-1.png
LVL 34
Mike EghtebasDatabase and Application DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vitor MontalvãoMSSQL Senior EngineerCommented:
Question 1: Is there a way to copy and paste the string of this recommendation?
Double click on the recommendation index (green text).

Question 2: What exactly does the above recommendation mean? Which of the following it is recommending:
None. The create index key is there (green text). Recommendation is to create an index on IDinAccess and include the rest of the fields so the engine doesn't need to access the main table to return those values.

Question 3: What red flags do you see on the Execution Plan/ Client Statistics tabs?
The ORDER BY clause is spending 83% of the process.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
re:> Double click on the recommendation index (green text).

This doesn't work maybe because I am using Express version.
0
Vitor MontalvãoMSSQL Senior EngineerCommented:
Can't test on Express edition because I don't have one.
Did you try right-click on it to see the available options?
0
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
Yes I did. It must be the difference in Express version.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.