Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MS SQL Server's equivalent to PostgreSQL's EXPLAIN

Is there a SQL Server equivalent to PostgreSQL's EXPLAIN command that I can run on SQL Server 2008 R2 Express (ie. without SQL Profiler)?

like image 238
ajbeaven Avatar asked May 03 '13 03:05

ajbeaven


People also ask

Is MS SQL the same as PostgreSQL?

PostgreSQL is an object-relational database, while Microsoft SQL Server is a relational database system. This means PostgreSQL offers more complex data types and allows object inheritance, though it also makes working with PostgreSQL more complex.

Why SQL Server is better than PostgreSQL?

PostgreSQL doesn't support in-memory database creation. SQL Server uses an optimistic strategy to handle memory-optimized tables, which means they can participate in transactions along with ordinary tables. Memory-based transactions are faster than regular ones, and this allows a drastic increase in application speed.

What are the syntax differences between PostgreSQL and SQL Server?

Server operating systems for PostgreSQL are FreeBSD, HP-UX, Linux, NetBSD, OpenBSD, OS X, Solaris, Unix and Windows. 8. In MS SQL Server, partitioning methods are Horizontal partitioning and Sharding through federation. In PostgreSQL, partitioning can be done by range, list and hash.

Does PostgreSQL use SQL Server?

PostgreSQL is an advanced object-relational database management system that uses Structured Query Language (SQL) in addition to its own procedural language, PL/pgSQL. PostgreSQL is easy-to-use with a full stack of RDBMS database features and capabilities for handling data.


1 Answers

You should use SET SHOWPLAN_ALL ON before submitting your query to display the execution plan. Do note, though, that it is scheduled to be removed in favour of SHOWPLAN_XML in a future version.

like image 122
hd1 Avatar answered Nov 03 '22 18:11

hd1