-
-
Save alliwallibobali/ce94e8767417c37aa34b40faf416ced4 to your computer and use it in GitHub Desktop.
One of the most common questions application developers ask is, “Why does my query run quickly sometimes and slowly at other times?” Consider the following stored procedure:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR ALTER PROCEDURE SalesDemo (@ProductID INT) | |
AS | |
SELECT ProductID, Sum(LineTotal) as TotalSales from Sales.SalesOrderDetail | |
WHERE ProductID = @ProductID | |
GROUP BY ProductID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment