MS SQL Consulting

Statistics Parser

Paste SET STATISTICS IO, TIME ON output · all processing is local
Before
Ctrl+Enter · auto-parses on paste
Link copied!

SET STATISTICS IO, TIME parser for SQL Server

Paste the Messages output of SET STATISTICS IO, TIME ON and get readable tables per statement and per table, totals for the whole batch and a list of issues to look at. Everything runs locally in your browser.

How to use it

  1. Run SET STATISTICS IO, TIME ON; before your query in SSMS or Azure Data Studio.
  2. Run the query and copy everything from the Messages tab.
  3. Paste it here. Use Compare to paste the output of the optimized query next to the original and see the difference per table.

What it shows

FAQ

What is the difference between logical and physical reads?

A logical read is an 8 KB page read from memory (the buffer pool); a physical read had to come from disk first. Judge how efficient a query is by its logical reads — physical reads mostly tell you whether the data was already cached.

What are Worktable and Workfile?

They are internal TempDB objects. Worktable is used by spools, cursors, LOB variables and Sort spills; read-ahead or physical reads on it usually mean a Sort spilled to TempDB. Workfile is used when a Hash Match spills. Both point to a memory grant that was too small, usually because of a row underestimate.

Why is elapsed time much higher than CPU time?

The query spent most of its time waiting — on locks, disk I/O, parallelism or the client reading the results. When CPU time is higher than elapsed time, the query ran in parallel.

What does "Scan count" mean?

How many times the table or index was accessed (seeks or scans). A parallel scan reports one per thread; a very high scan count with many logical reads often means repeated lookups on the inner side of a Nested Loops join.

Is my output sent anywhere?

No. Parsing happens in your browser. The Share link stores the text in the part of the URL after #, which browsers do not send to the server.

Built by Aksel Rohtsalu, MS SQL Server consultant at dba.ee. Related tools: Query Plan Parser · SQL Server Health Check.