SQL Server statement details
Use the statement details to examine one statement of a SQL Server instance: its text, history, plan and the sessions that run it.
Before you begin
The panel reads only the data that Scops keeps. It sends no query to the instance.
Open a statement
- Click a statement on the Dashboard or on Insights, or a query hash on Live Activity.
- Or, on the Dashboard, type a query hash in the box next to the Statements tab and press Enter.
The header shows the query hash, then the kind of statement or its module, and the database. parallel · DOP 8 means a parallel run. 3 plans means that it ran with more than one plan.
The card in the header shows Status: Running now, or when Scops last saw it. It also shows the sessions, the login, the wait and the window of the page. To go to a section, click it in the list at the left. A dim item has no data.
Read the statement text
The buttons in the section header copy the statement and show all of it. The panel shows the first 400 lines until you expand it. An encrypted module has no text.
Examine the history
| Tab | What it shows |
|---|---|
| Activity | The average active tasks of the statement in the window of the page, by wait category. From Live Activity, and from the Dashboard in Live without a range, the last hour. |
| Elapsed, CPU, Disk, Gets, Rows | The average of one execution, one line per plan. Disk is physical reads, Gets is logical reads. |
| Executions | How many times it ran to its end in each interval. |
| Table | Each interval and plan as a row, with the memory grant and the spills. |
A break in a line means that the statement did not run. To zoom, drag across the chart. Reset Zoom shows all of it again. To show one plan, click it in the legend.
Select 1D or 1W to show the last 24 hours or 7 days. The panel opens on 1D. If the last 24 hours have fewer than 12 intervals of the statement, it opens on 1W. If the page shows an earlier window, the panel opens on a range that includes it.
See who runs it now
Right Now lists the sessions that run the statement in the newest sample, with their wait, elapsed time and blocker. To read the newest sample again, click the refresh button. Click a session to open Live Activity.
Examine the plan
If Scops keeps more than one plan, select a plan in the list. Each plan shows its hash and when Scops last saw it.
Read the facts of the plan, such as Parallelism, Estimator, the memory grant, Estimated cost and Compile.
Open Plan review to see the warnings of the optimizer and the missing indexes.
Examine Operators, the plan as a tree. Share is amber when an operator has 50% or more of the cost.
To open the plan in Management Studio, click Save Plan. Scops saves a .sqlplan file. If a plan is too large to show in full, save it to read all of it.
Objects it touches
The tables and indexes of the plan, and how the plan uses them. Use is amber for a scan. Rows, Size, Last Read and Last Written come from Sizing. A dash means that Sizing does not keep the object: it keeps the larger tables and indexes.
Samples
Click Load to read the newest sampled rows of the statement. Scops reads up to 300 rows from the last 15 minutes of the window, or of the last hour.
Parameters
The values that the plan was compiled for, from the plan. SQL Server does not keep the values that the statement runs with.
Ask Scops AI
When Scops AI is on, two buttons send the statement to it, only when you click them:
- Ask Scops, at the bottom of the panel, analyzes the statement.
- Analyze Plan, in the plan section, analyzes the selected plan.
Related
Updated November 22, 2026