How do you know how efficient an SQL statement is, knowing only 3 of the following:
1. Analysis of disk activity (IO) information through SQL statement execution:set STATISTICS io on (open)/ set STATISTICS iooff (closed)
2. Time spent parsing, compiling, and executing through SQL statements:set STATISTICS times on (open)/ set STATISTICS(off)
3. View by Execution plan: Ctrl + L
--------------------------------------------------------------------------------------------------------------- -------------------------------------
First there is a table, the table data is not much, so the results may not be too obvious ...
1, first execute SET STATISTICS IO on & set STATISTICStime on;
2, execute the query statement, select the Message Options page, for easy viewing, use the aggregate function, GROUP by,ORDER by:
"We did not query the table: worktable, why there are worktable records, the most most of the following note." 】