exam questions

Exam 70-762 All Questions

View all questions & answers for the 70-762 exam

Exam 70-762 topic 1 question 168 discussion

Actual exam question from Microsoft's 70-762
Question #: 168
Topic #: 1
[All 70-762 Questions]

DRAG DROP -
You are tuning a database named MyDatabase.
You need to create an Extended Events session to capture execution plans for queries that run for at least 10 minutes. The following requirements must be met:
✑ The target must write complete buffers to disk asynchronously.
✑ The system must retain a maximum of 10 files
✑ Each session must allocate no more than 10 megabytes (MB) of memory for event buffering.
Which four Transact-SQL segments should you use to develop the solution? To answer, move the appropriate Transact-SQL segments from the list of Transact-
SQL segments to the answer area and arrange them in the correct order.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Step 1: CREATE EVENT SESSION SubOptimalExecPlans ON SERVER
Step 2: ADD EVENT sqlserver.query.query_pre_execution_showplan
Incorrect Answers:

Query_post_execution_showplan -

Step 3: ADD TARGET package0.asynchronous_file_target .. max_rollower_files=10)
The target must write complete buffers to disk asynchronously.
The system must retain a maximum of 10 files
Step 4: WITH (MAX_MEMORY = 10 MB) ;
Each session must allocate no more than 10 megabytes (MB) of memory for event buffering.
Example:
CREATE EVENT SESSION test_session

ON SERVER -
ADD EVENT sqlos.async_io_requested,
ADD EVENT sqlserver.lock_acquired
ADD TARGET package0.etw_classic_sync_target
(SET default_etw_session_logfile_path = N'C:\demo\traces\sqletw.etl' )
WITH (MAX_MEMORY=4MB, MAX_EVENT_SIZE=4MB);
References:
https://www.sqlservercentral.com/steps/stairway-to-sql-server-extended-events-level-4-extended-events-engine-essential-concepts

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
Zikato
Highly Voted 5 years, 4 months ago
Should be query post_execution showplan - the explanation has it right, but it's chosen wrong in the asnwers.
upvoted 7 times
itdoesntmatter
5 years, 3 months ago
The explanation: "Incorrect Answers: Query_post_execution_showplan." So the answer is correct.
upvoted 1 times
lh2607
4 years, 7 months ago
Ignore this comment, the answer isn't correct. It's definitely not pre-execution showplan. Its post.
upvoted 2 times
...
...
amar111
5 years, 1 month ago
i will also go with sqlserver.query.query_post_execution_showplan
upvoted 6 times
...
...
Lukis92
Highly Voted 4 years, 10 months ago
"capture execution plans for queries that run for at least 10 minutes" - query_post_execution_showplan. This type of showplan includes runtime information.
upvoted 6 times
...
BabyBee
Most Recent 4 years, 5 months ago
query_pre_execution_showplan This Extended Event captures the estimated query plan for a query. An estimated query plan is prepared without executing the query. query_post_execution_showplan This Extended Event captures the actual query plan for a query. An actual query plan is the estimated query plan that includes runtime information. For this reason, it is not available until after the query executes.
upvoted 1 times
...
JohnFan
5 years, 4 months ago
Use the query_pre_execution_showplan or query_post_execution_showplan Extended Events as a lightweight method to capture the estimated or actual query plans, respectively. In particular, be aware that the query_post_execution_showplan event is expensive and should be avoided on a production server. If you must use it to troubleshoot a specific issue, take care to restrict its use to a limited time only.
upvoted 3 times
Cococo
4 years, 9 months ago
there is nothing about the solution's performance in this task, no one cares it is heavy
upvoted 6 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 ...