Statement execution in SQL Server consists of two phases: compilation and execution. The following Settings allow SQL Server to perform the necessary retrieval before and after executing SQL code. In the actual development process, flexible use of these Settings can improve the development efficiency, get twice the result with half the effort.

SET SHOWPLAN_ALL { ON | OFF }

Anticipate steps and resource information for statement execution, but do not actually execute it. Estimates of script performance are helpful.

SET SHOWPLAN_ALL { ON | OFF }

SET STATISTICS PROFILE { ON | OFF }

Displays information about the actual execution of statements, real execution, and real resource usage.

SET FMTONLY { ON | OFF }

Returns the column name, excluding data. Sometimes when you execute an SQL query, you just want to know the retrieved metadata, not the rows.

SET NOEXEC { ON | OFF }

Compile but do not execute. When ON, SQL Server compiles each batch of processing statements but does not execute them.

SET PARSEONLY { ON | OFF }

Syntax is checked, but not compiled and executed.