Skip to content

Commit ded45f9

Browse files
committed
Fixed spelling and formatting errors in FLGP readme file
1 parent 478b01f commit ded45f9

File tree

1 file changed

+13
-11
lines changed
  • samples/features/automatic-tuning/force-last-good-plan

1 file changed

+13
-11
lines changed

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

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Forcing last good plan
2-
This code sample demonstrates how [Automatic tuning in SQL Server 2017 CTP2.0+] (https://docs.microsoft.com/sql/relational-databases/automatic-tuning/automatic-tuning) can identify and automatically fix performance problems in your workload.
2+
This code sample demonstrates how [Automatic tuning in SQL Server 2017 CTP2.0+](https://docs.microsoft.com/sql/relational-databases/automatic-tuning/automatic-tuning) can identify and automatically fix performance problems in your workload.
33

44
### Contents
55

@@ -22,7 +22,7 @@ This code sample demonstrates how [Automatic tuning in SQL Server 2017 CTP2.0+]
2222
5. **Author:** Jovan Popovic [jovanpop-msft]
2323

2424
There are two ways to demonstrate the feature using this sample:
25-
- Level 300 demo: T-SQL code that simulates workload using T-SQL commands and shows results using dynamic management views.
25+
- Level 300 demo: T-SQL code that simulates workload using T-SQL commands and shows results using dynamic management views and Query Store UI in SQL Server Management Studio.
2626
- Level 100-200 demo: ASP.NET application that simulates workload using AJAX requests sent to web server and shows results in the web page. Optionally use Query Store UI in SQL Server Management Studio to show performance regressions.
2727

2828
<a name=before-you-begin></a>
@@ -41,19 +41,20 @@ To run this sample, you need the following prerequisites.
4141
## Run this sample
4242

4343
### Setup code
44-
1. Clone this repository using Git for Windows (http://www.git-scm.com/), or download the zip file.
44+
1. Download [T-SQL script files in sql-scripts](sql-scripts) folder. Optionally you can clone this repository using [Git for Windows](http://www.git-scm.com/), or download the zip file.
4545
2. Download the [WideWorldImporters](../../../databases/wide-world-importers) database and restore it on your server.
4646
3. Execute setup.sql script on your [WideWorldImporters](../../../databases/wide-world-importers) database that will add necessary stored procedures and indexes.
4747

4848
### Configure ASP.NET sample (Only for ASP.NET Sample)
49-
1. Open appsettings.json file in the root of the folder and change server, database, username, and password in the connection string.
50-
2. From the project root folder open command prompt and run `dotnet update`, `dotnet build`, and `dotnet run`. These commands will update NuGet packages, build project, and run web app. As an alternative,
49+
1. Clone this repository using [Git for Windows](http://www.git-scm.com/), or download the zip file, if you have not done it.
50+
2. Open appsettings.json file in the root of the folder and change server, database, username, and password in the connection string.
51+
3. From the project root folder open command prompt and run `dotnet update`, `dotnet build`, and `dotnet run`. These commands will update NuGet packages, build project, and run web app. As an alternative,
5152
open project using Visual Studio 2015 U3, or Visual Studio Code, compile and run sample.
5253

5354
<a name=sample-details></a>
5455

5556
This sample demonstrates how SQL Server 2017 analyzes workload, keep track about the last good
56-
plan that successfully executed the query, and reverts regressed plan if it is worse that the last known good plan.
57+
plan that successfully executed the query in the past, and reverts regressed plan if it is worse that the last known good plan.
5758
The following query is used to demonstrate plan regression and correction:
5859

5960
```
@@ -72,7 +73,7 @@ Open **demo-full.sql** and follow the comments in the code. Here is the short ex
7273
- Execute query `EXEC dbo.regression` to cause the regression.
7374
- Execute query `EXEC dbo.report 7` 20 times and verify that the execution is slower.
7475
- Query `sys.dm_db_tuning_recommendations` and verify that regression is detected and that
75-
the correction script is in the view. You can use the following query:
76+
the correction script is in the view. Since some information are formatted as JSON docuemnts, you can use the following query to extract relevant information:
7677

7778
```
7879
SELECT planForceDetails.query_id, reason, score,
@@ -94,7 +95,7 @@ Fig. 1. Optimal plan with "Hash Aggregate".
9495
![Regressed plan](../../../../media/features/automatic-tuning/flgp-query-store-ui-regressed-plan.png "Regressed plan")
9596
Fig. 2. Regressed plan with "Stream Aggregate".
9697

97-
- Take the script from the `sys.dm_db_tuning_recommendations` view and force the recommended plan.
98+
- Take the correction script from the `sys.dm_db_tuning_recommendations` view and force the recommended plan.
9899
- 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.
99100

100101
#### Part II - Automatic tuning
@@ -134,13 +135,14 @@ After some time, you will notice that the regression will be automatically corre
134135
<a name=disclaimers></a>
135136

136137
## Disclaimers
137-
The code included in this sample is not intended to be a set of best practices on how to build scalable enterprise grade applications. This is beyond the scope of this quick start sample.
138+
The code included in this sample is not intended to be a set of best practices on how to build scalable enterprise grade applications. This is beyond the scope of this sample.
138139

139140
<a name=related-links></a>
140141

141142
## Related Links
142143

143-
- [Automatic tuning in SQL Server 2017 CTP2.0+] (https://docs.microsoft.com/sql/relational-databases/automatic-tuning/automatic-tuning)
144-
- [Monitoring Performance By Using the Query Store] (https://docs.microsoft.com/en-us/sql/relational-databases/performance/monitoring-performance-by-using-the-query-store)
144+
- [Automatic tuning in SQL Server 2017 CTP2.0+](https://docs.microsoft.com/sql/relational-databases/automatic-tuning/automatic-tuning)
145+
- [sys.dm_db_tuning_recommendations view (Transact-SQL)](https://docs.microsoft.com/sql/relational-databases/system-dynamic-management-views/sys-dm-db-tuning-recommendations-transact-sql)
146+
- [Monitoring Performance By Using the Query Store](https://docs.microsoft.com/en-us/sql/relational-databases/performance/monitoring-performance-by-using-the-query-store)
145147

146148

0 commit comments

Comments
 (0)