DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE
SITE SEARCH SQLUSA.com HEADLINES NEWS
SQL E/BOOKS   SQL 2014 PROGRAMMING   DOWNLOADS
SCRIPTS SQL 2005 SQL 2008 ARTICLES
SQL JOBS TWITTER FORMAT VIDEOS
How to measure query complexity?

The following SQL query complexity measure is very simple to use, yet very powerful.

Query complexity =

number of tables +

number of SELECT/INSERT/UPDATE/MERGE columns +

number of JOINs +

number of WHERE clause predicates +

number of GROUP BY columns +

number of ORDER BY columns +

number of WHEN clauses in CASE expressions +

number of sytem function references +

number of UDF references +

number of function nestings +

number of UNIONs

 

Related articles:

Measuring the complexity of SQL statements

Query and Stored Procedure Optimization

 

 

Exam Prep 70-461
Exam 70-461
DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE