<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/understanding-showplan-all-in-sql-server-and-microsoft-fabric-sbipvmnjj" -->

---
title: Understanding SHOWPLAN_ALL in SQL Server and Microsoft...
description: SHOWPLAN_ALL is a SQL Server session-level setting that returns the estimated execution plan instead of executing a query. It reveals physical operators the...
canonical: https://daily.dev/posts/understanding-showplan-all-in-sql-server-and-microsoft-fabric-sbipvmnjj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Understanding SHOWPLAN_ALL in SQL Server and Microsoft Fabric | daily.dev
og:description: SHOWPLAN_ALL is a SQL Server session-level setting that returns the estimated execution plan instead of executing a query. It reveals physical operators the...
og:url: https://daily.dev/posts/understanding-showplan-all-in-sql-server-and-microsoft-fabric-sbipvmnjj
og:image: https://api.daily.dev/og/posts/sbIPvMNjj.png
og:image:alt: Understanding SHOWPLAN_ALL in SQL Server and Microsoft Fabric
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Understanding SHOWPLAN_ALL in SQL Server and Microsoft Fabric

**[C\# Corner](https://daily.dev/sources/csharpcorner)** · 5 min read · 1 upvotes · 0 comments

## Summary

SHOWPLAN_ALL is a SQL Server session-level setting that returns the estimated execution plan instead of executing a query. It reveals physical operators the optimizer intends to use, helping diagnose slow queries, identify expensive operations like sorts and scans, and compare query implementations. A key pitfall: once enabled, every subsequent query in the session returns a plan rather than data — until explicitly disabled with SET SHOWPLAN_ALL OFF. The post also covers related session settings (SHOWPLAN_XML, STATISTICS IO, STATISTICS TIME) and explains why reading execution plans is an essential skill for data engineers working with SQL Server or Microsoft Fabric SQL Database.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.csharp.com/article/understanding-showplanall-in-sql-server-and-microsoft-fabric>

## Questions this post answers

### Why does every query in my SQL Server session suddenly return an execution plan instead of results?

SHOWPLAN_ALL is a session-level setting, not a one-time command, so once enabled it affects every subsequent query in that session until explicitly turned off. Running SET SHOWPLAN_ALL OFF disables it and immediately restores normal query execution, returning actual data instead of the estimated plan.

_Debugging odd SQL Server session behavior gets easier when you track fixes like this on daily.dev._

### How is SHOWPLAN_ALL different from EXPLAIN in PostgreSQL or MySQL?

SQL Server does not support an EXPLAIN command like PostgreSQL, MySQL, Oracle, or Databricks SQL; instead it relies on SHOWPLAN_ALL and graphical execution plans to show the optimizer's intended physical operators without running the query. SHOWPLAN_ALL returns the estimated execution plan as a result set rather than executing the query and returning data.

_Comparing execution plan tools across databases is easier when you follow SQL Server tips on daily.dev._

## Similar posts on daily.dev

- [AI Execution Plan Analysis: I Gave It My Plan and Asked What Was Wrong](https://daily.dev/posts/ai-execution-plan-analysis-i-gave-it-my-plan-and-asked-what-was-wrong-goqe4azrt) · SQL Authority · 0 upvotes · 0 comments
- [Understanding EXPLAIN FORMATTED in Databricks SQL](https://daily.dev/posts/understanding-explain-formatted-in-databricks-sql-p3cwhgdei) · C\# Corner · 0 upvotes · 0 comments
- [Introducing the Query Tuning Agent: Optimize Your Most Complex Workloads](https://daily.dev/posts/introducing-the-query-tuning-agent-optimize-your-most-complex-workloads-hhvgwretf) · SingleStore · 2 upvotes · 0 comments
- [Query Plan Hints in PostgreSQL 19: How & When to Use Advice](https://daily.dev/posts/query-plan-hints-in-postgresql-19-how-when-to-use-advice-nuiwyskol) · Planet PostgreSQL · 0 upvotes · 0 comments

---

Tags: [#microsoft-sql-server](https://daily.dev/tags/microsoft-sql-server), [#microsoft-fabric](https://daily.dev/tags/microsoft-fabric)

[View this post on daily.dev](https://daily.dev/posts/understanding-showplan-all-in-sql-server-and-microsoft-fabric-sbipvmnjj)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Understanding SHOWPLAN_ALL in SQL Server and Microsoft Fabric","url":"https://daily.dev/posts/understanding-showplan-all-in-sql-server-and-microsoft-fabric-sbipvmnjj","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/understanding-showplan-all-in-sql-server-and-microsoft-fabric-sbipvmnjj"},"datePublished":"2026-07-21T06:37:15.336Z","dateModified":"2026-09-14T09:05:31.238Z","description":"SHOWPLAN_ALL is a SQL Server session-level setting that returns the estimated execution plan instead of executing a query. It reveals physical operators the...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/81f698b062e81502c45df6b257ae3843?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/81f698b062e81502c45df6b257ae3843?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"C# Corner","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"C# Corner","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/ada2d584df6241748fc4e71878dc70a3","url":"https://daily.dev/sources/csharpcorner"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/understanding-showplan-all-in-sql-server-and-microsoft-fabric-sbipvmnjj","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"microsoft-sql-server,microsoft-fabric","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"C# Corner","item":"https://daily.dev/sources/csharpcorner"},{"@type":"ListItem","position":3,"name":"Understanding SHOWPLAN_ALL in SQL Server and Microsoft Fabric"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/understanding-showplan-all-in-sql-server-and-microsoft-fabric-sbipvmnjj#faq","mainEntity":[{"@type":"Question","name":"Why does every query in my SQL Server session suddenly return an execution plan instead of results?","acceptedAnswer":{"@type":"Answer","text":"SHOWPLAN_ALL is a session-level setting, not a one-time command, so once enabled it affects every subsequent query in that session until explicitly turned off. Running SET SHOWPLAN_ALL OFF disables it and immediately restores normal query execution, returning actual data instead of the estimated plan. Debugging odd SQL Server session behavior gets easier when you track fixes like this on daily.dev."}},{"@type":"Question","name":"How is SHOWPLAN_ALL different from EXPLAIN in PostgreSQL or MySQL?","acceptedAnswer":{"@type":"Answer","text":"SQL Server does not support an EXPLAIN command like PostgreSQL, MySQL, Oracle, or Databricks SQL; instead it relies on SHOWPLAN_ALL and graphical execution plans to show the optimizer's intended physical operators without running the query. SHOWPLAN_ALL returns the estimated execution plan as a result set rather than executing the query and returning data. Comparing execution plan tools across databases is easier when you follow SQL Server tips on daily.dev."}}]}
```

