From the course: SQL Server 2008 Essential Training
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Viewing execution plans - SQL Server Tutorial
From the course: SQL Server 2008 Essential Training
Viewing execution plans
After you've written a few more complex SQL statements where you're using joins and sub-queries, you'll probably end up wondering, well which one is better performance-wise? Is one objectively faster or slower than the other? And of course it depends on how you are doing the join and how you are doing the sub-query, but there is a way to find out. So I'm looking right now here at the example I did in the previous module, which is selecting the company with the most expensive order, one way doing it using a JOIN, Action Bicycle Specialists, and one way doing a sub-query. Same data, same result. But what if we want to know which one is faster? Well there are quite a few ways of doing it to get fairly detailed. You can get into what's called the SQL Server Profiler, but we don't need to go that heavy. What I'm going to do is select the two blocks that I want to do. This is now considered our batch, but formally, the entire file is because there is nothing else in the file. I'm going to…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
(Locked)
Introduction to Transact-SQL3m 43s
-
(Locked)
Using SELECT statements7m 16s
-
(Locked)
Changing the default database2m 21s
-
(Locked)
Creating conditions in SQL8m 10s
-
(Locked)
Sorting your output3m 23s
-
(Locked)
Using aggregate functions7m 12s
-
(Locked)
Finding unique values2m 14s
-
(Locked)
Joining multiple tables together8m
-
(Locked)
Using subqueries9m 33s
-
(Locked)
Viewing execution plans3m 37s
-
(Locked)
-
-
-
-
-
-
-
-
-