mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
Rename samples/demos/mssqltiger/Showplan/SortWarning.sql to samples/demos/Showplan/SortWarning.sql
This commit is contained in:
21
samples/demos/Showplan/SortWarning.sql
Normal file
21
samples/demos/Showplan/SortWarning.sql
Normal file
@ -0,0 +1,21 @@
|
||||
-- Sort Spill
|
||||
|
||||
-- Get Actual Execution Plan
|
||||
|
||||
USE AdventureWorks2014
|
||||
--USE AdventureWorks2016CTP3
|
||||
GO
|
||||
--Execute
|
||||
DBCC FREEPROCCACHE
|
||||
GO
|
||||
SELECT *
|
||||
FROM Sales.SalesOrderDetail SOD
|
||||
INNER JOIN Production.Product P ON SOD.ProductID = P.ProductID
|
||||
ORDER BY Style
|
||||
OPTION (QUERYTRACEON 9481)
|
||||
GO
|
||||
|
||||
/*
|
||||
Observe the type of Spill = 1
|
||||
Means one pass over the data was enough to complete the sort in the Worktable
|
||||
*/
|
||||
Reference in New Issue
Block a user