Skip to content

Instantly share code, notes, and snippets.

@samirbehara-zz
Created May 14, 2016 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samirbehara-zz/45d2064ebca3f907656bc975127e6b1d to your computer and use it in GitHub Desktop.
Save samirbehara-zz/45d2064ebca3f907656bc975127e6b1d to your computer and use it in GitHub Desktop.
Live Query Statistics in SQL Server 2016
-- Script to demonstrate the Live Query Statistics Feature in SQL Server 2016
SELECT * FROM Production.Product PR
INNER JOIN Production.Product_ondisk PO
ON PO.SellStartDate = PR.SellStartDate
--ON PO.ProductSubcategoryID = PR.ProductSubcategoryID
INNER JOIN Production.ProductModel PM
ON PM.ProductModelID = PR.ProductModelID
CROSS APPLY Production.ProductSubcategory PSC
WHERE PR.ProductNumber LIKE '%FR%'
--------------------------------------------------------------
SELECT * FROM Production.Product PR
INNER JOIN Production.Product_ondisk PO
ON PO.FinishedGoodsFlag = PR.FinishedGoodsFlag
CROSS APPLY Production.ProductSubcategory PSC
WHERE PR.ProductNumber LIKE '%FR%'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment