Skip to content

Commit 7cb921b

Browse files
author
pmasl
committed
Updated IQP notebook demos
1 parent 49aba07 commit 7cb921b

11 files changed

Lines changed: 1222 additions & 80077 deletions

samples/features/intelligent-query-processing/Intelligent QP Demo Setup - Enlarging WideWorldImportersDW.sql

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ GO
1818
Assumes a fresh restore of WideWorldImportersDW
1919
*/
2020

21-
IF OBJECT_ID('Fact.OrderHistory') IS NULL BEGIN
21+
IF OBJECT_ID('Fact.OrderHistory') IS NULL
22+
BEGIN
2223
SELECT [Order Key], [City Key], [Customer Key], [Stock Item Key], [Order Date Key], [Picked Date Key], [Salesperson Key], [Picker Key], [WWI Order ID], [WWI Backorder ID], Description, Package, Quantity, [Unit Price], [Tax Rate], [Total Excluding Tax], [Tax Amount], [Total Including Tax], [Lineage Key]
2324
INTO Fact.OrderHistory
2425
FROM Fact.[Order];
@@ -61,7 +62,8 @@ GO 4
6162
SELECT COUNT(*) FROM Fact.OrderHistory;
6263
GO
6364

64-
IF OBJECT_ID('Fact.OrderHistoryExtended') IS NULL BEGIN
65+
IF OBJECT_ID('Fact.OrderHistoryExtended') IS NULL
66+
BEGIN
6567
SELECT [Order Key], [City Key], [Customer Key], [Stock Item Key], [Order Date Key], [Picked Date Key], [Salesperson Key], [Picker Key], [WWI Order ID], [WWI Backorder ID], Description, Package, Quantity, [Unit Price], [Tax Rate], [Total Excluding Tax], [Tax Amount], [Total Including Tax], [Lineage Key]
6668
INTO Fact.OrderHistoryExtended
6769
FROM Fact.[OrderHistory];
@@ -102,8 +104,10 @@ UPDATE Fact.OrderHistoryExtended
102104
SET [WWI Order ID] = [Order Key];
103105
GO
104106

105-
-- Repeat until log shrinks
107+
-- Repeat the following until log shrinks. These demos don't require much log space
106108
CHECKPOINT
107109
GO
108110
DBCC SHRINKFILE (N'WWI_Log' , 0, TRUNCATEONLY)
111+
GO
112+
SELECT * FROM sys.dm_db_log_space_usage
109113
GO

samples/features/intelligent-query-processing/notebooks/Batch_Mode_on_Rowstore.ipynb

Lines changed: 134 additions & 95 deletions
Large diffs are not rendered by default.
20.3 KB
Loading
25.3 KB
Loading
22.1 KB
Loading
22.8 KB
Loading
12.7 KB
Loading
25.2 KB
Loading
25.9 KB
Loading
23.3 KB
Loading

0 commit comments

Comments
 (0)