exam questions

Exam DP-300 All Questions

View all questions & answers for the DP-300 exam

Exam DP-300 topic 4 question 14 discussion

Actual exam question from Microsoft's DP-300
Question #: 14
Topic #: 4
[All DP-300 Questions]

HOTSPOT -
You have an Azure SQL database.
You are reviewing a slow performing query as shown in the following exhibit.

Use the drop-down menus to select the answer choice that completes each statement based on the information presented in the graphic.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: Live Query Statistics -
Live Query Statistics as it a percentage of the execution.

Box 2: Key Lookup -
The use of a Key Lookup operator in a query plan indicates that the query might benefit from performance tuning. For example, query performance might be improved by adding a covering index.
Reference:
https://docs.microsoft.com/en-us/sql/relational-databases/performance/live-query-statistics?view=sql-server-ver15 https://docs.microsoft.com/en-us/sql/relational-databases/showplan-logical-and-physical-operators-reference

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
SQLHell
Highly Voted 2 years, 10 months ago
Estimated execution plan and Key Lookup
upvoted 11 times
Daba
2 years, 9 months ago
KeyLookup - yes, but this is Live Query Statistics (e.g. percentage of execution)
upvoted 11 times
...
...
gp_engine
Highly Voted 3 years ago
As per below, 2nd selection has to be "Key Lookup" (not Nested loop). The Key Lookup operator is a bookmark lookup on a table with a clustered index. The Argument column contains the name of the clustered index and the clustering key used to look up the row in the clustered index. Key Lookup is always accompanied by a Nested Loops operator. If the WITH PREFETCH clause appears in the Argument column, the query processor has determined that it is optimal to use asynchronous prefetching (read-ahead) when looking up bookmarks in the clustered index. The use of a Key Lookup operator in a query plan indicates that the query might benefit from performance tuning. For example, query performance might be improved by adding a covering index. https://docs.microsoft.com/en-us/sql/relational-databases/showplan-logical-and-physical-operators-reference?view=sql-server-ver15
upvoted 6 times
...
Ben999
Most Recent 8 months, 2 weeks ago
Shouldn't this be Index Seek rather than Key Lookup? A covering index would prevent the Key lookup completely, and the seek occurs before the lookup. Tuning the seek would prevent the key lookup
upvoted 1 times
...
Pranava_GCP
1 year, 6 months ago
Box 1: Live Query Statistics Box 2: Key Lookup
upvoted 2 times
...
amazonalex
1 year, 6 months ago
Live Query/key lookup
upvoted 2 times
...
SamBalbij
3 years ago
Live statistics can be recognized from the Query Progress box top left. The nested loop operator is used wheneven no appropriate index is available for key lookup or index seek. An index is always faster, so Nested Loop means opportunity for performance improvement.
upvoted 5 times
SSK123456
2 years, 11 months ago
Not necessarily nested loop means every time there is an opportunity for improvement, it depends on the amount of data in the table
upvoted 3 times
...
...
Aggie0702
3 years, 1 month ago
why nested loops rather than index?
upvoted 3 times
Mapep
3 years, 1 month ago
Wondering same. The screenshot clearly shows in green that the query can benefit from the creation of a nonclustered index. Therefore, the second answer should be Index Seek.
upvoted 5 times
captainpike
3 years, 1 month ago
The new index is probably by CustomerID including OrderID, PickedByPersonID, OrderDate. Being that the case, the current Key Lookup would desapear. The Index Seek would be replaced by the new one using the new index. Would that change your mind about being the Nested Loops the one that is going to get benefited? It changed mine.
upvoted 1 times
Soiram
2 years, 9 months ago
Actually there will be no key lookup neither nested loops with the new index, therefore I cannot say which will benefit
upvoted 1 times
...
...
U_C
3 years, 1 month ago
I agree
upvoted 1 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago