March 2018
Intermediate to advanced
816 pages
19h 35m
English
To simulate a database workload, you will execute one simple query. Ensure that the database is in compatibility mode 110, and that Query Store is empty, in order to track your queries easily:
ALTER DATABASE WideWorldImporters SET COMPATIBILITY_LEVEL = 110;ALTER DATABASE WideWorldImporters SET QUERY_STORE CLEAR;
Run this code to execute one statement 100 times, as shown in the following command:
SET NOCOUNT ON;SELECT * FROM Sales.Orders oINNER JOIN Sales.OrderLines ol ON o.OrderID = ol.OrderIDWHERE SalespersonPersonID IN (0, 897);GO 100
The previous query returns no rows; there are no orders in the Sales.Orders table handled by sales persons with given IDs. After executing this single query 100 times, you can check ...
Read now
Unlock full access