Skip to content

Commit e23f49d

Browse files
committed
Updated FLGP demo
1 parent 4bace56 commit e23f49d

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed
-975 Bytes
Loading

samples/features/automatic-tuning/force-last-good-plan/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ Open demo-full.sql and follow the comments in the code.
6666
correction script is in the view
6767
- Open Query Store UI in SSMS (e.g. "Top Resource Consuming Queries") and find the query. Verify that there are two plans - one faster with **Hash Aggregate** and another slower with **Stream Aggregate**
6868

69-
![Last good plan](../../../../media/features/automatic-tuning/flgp-query-store-ui-last-good-plan.png "Last good plan") ![Regressed plan](../../../../media/features/automatic-tuning/flgp-query-store-ui-regressed-plan.png "Regressed plan")
69+
![Last good plan](../../../../media/features/automatic-tuning/flgp-query-store-ui-last-good-plan.png "Last good plan")
70+
Fig. 1. Optimal plan with "Hash Aggregate".
71+
72+
![Regressed plan](../../../../media/features/automatic-tuning/flgp-query-store-ui-regressed-plan.png "Regressed plan")
73+
Fig. 2. Regressed plan with "Stream Aggregate".
7074

7175
- Take the script from the `sys.dm_db_tuning_recommendations` view and force the recommended plan.
7276
- Execute query `EXEC dbo.report 7` 20 times and verify that the execution is faster. Open Query Store UI in SSMS (e.g. "Top Resource Consuming Queries"), find the query, verify that the plan is forced and that the regression is fixed.
@@ -87,11 +91,13 @@ Web page collects response from the web server, calculates expected throughput b
8791
last 10 T-SQL request durations, and displays how many requests per second can be executed.
8892

8993
![Web app](../../../../media/features/automatic-tuning/flgp-web-ui.png "Demo web app")
94+
Fig. 3. Number of requests per seconds.
9095

9196
In default state, automatic tuning is turned OFF on the database. You can press **Regression**
9297
button to cause SQL plan choice regression in database layer. On the user interface will be shown decreased number of requests per seconds that can be served.
9398

9499
![Web app](../../../../media/features/automatic-tuning/flgp-web-ui-regression.png "Demo web app")
100+
Fig. 4. Number of requests per seconds after regression.
95101

96102
If you refresh the page, the database state will be cleaned (i.e. query store and plan cache will be cleaned). You can turn on automatic tuning, wait some time to SQL Database analyze the workload and cause the regression again. You will notice that there is a regression that will be automatically corrected after some time. Pressing the **Regression** button again will not cause any regression.
97103

samples/features/automatic-tuning/force-last-good-plan/wwwroot/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828

2929
body {
3030
margin: auto;
31-
width: 80%;
3231
}
3332
</style>
3433
<link href="media/bootstrap.min.css" rel="stylesheet" />

0 commit comments

Comments
 (0)