|
1 |
| -# Ticket Reservations Sample |
| 1 | +# Sample name |
2 | 2 |
|
3 |
| -Ticket Reservations is a Windows Forms sample application built on .NET Framework 4.6 that demonstrates the performance benefits of using SQL Server memory optimized tables and native compiled stored procedures. You can compare the performance before and after enabling In-Memory OLTP by observing the transactions/sec as well as the current CPU Usage and latches/sec. |
| 3 | +Briefly describe what the sample does. Describe the benefit of running this sample. |
4 | 4 |
|
5 |
| - |
| 5 | +<!-- Add a diagram if you have it --> |
6 | 6 |
|
| 7 | + |
7 | 8 |
|
8 |
| -## Applies |
9 | 9 |
|
10 |
| -**Platforms:** |
11 |
| -- SQL Server (starting with 2016) |
12 |
| -- Azure SQL Database |
| 10 | +### Contents |
13 | 11 |
|
14 |
| -**Features:** |
15 |
| -- In-memory OLTP |
| 12 | +[About this sample](#about-this-sample)<br/> |
| 13 | +[Before you begin](#before-you-begin)<br/> |
| 14 | +[Run this sample](#run-this-sample)<br/> |
| 15 | +[Sample details](#sample-details)<br/> |
| 16 | +[Disclaimers](#disclaimers)<br/> |
| 17 | +[Related links](#related-links)<br/> |
16 | 18 |
|
17 |
| -**Languages:** |
18 | 19 |
|
19 |
| -- TSQL |
20 |
| -- C# |
| 20 | +<a name=about-this-sample></a> |
21 | 21 |
|
| 22 | +## About this sample |
22 | 23 |
|
23 |
| -## Running this sample |
24 |
| -1. Before you can run this sample, you must have the following perquisites: |
25 |
| - - SQL Server 2016 CTP3 (or higher) |
26 |
| - - Visual Studio 2015 (or higher) with the latest SSDT installed. |
| 24 | +Applies to: |
27 | 25 |
|
28 |
| -2. Clone this repository using Git for Windows (http://www.git-scm.com/), or download the zip file. |
| 26 | +- SQL Server 2016 (or higher), or Azure SQL Data Warehouse |
29 | 27 |
|
30 |
| -3. From Visual Studio, open the **InMemoryOLTPDemo.sln** file from the root directory. |
| 28 | +Key features: |
31 | 29 |
|
32 |
| -4. In Visual Studio Build menu, select **Build Solution** (or Press F6). |
| 30 | +- columnstore indexes |
33 | 31 |
|
34 |
| -5. In the **App.config** file, located in the project root, find the **TicketReservations** app setting and edit the connectionString if needed. Currently it is configured to connect to the local default SQL Server Instance using Integrated Security. |
| 32 | +Workload: |
| 33 | +- data warehouse |
35 | 34 |
|
36 |
| -6. Publish the TicketReservations Database |
37 |
| - - Right click on the TicketReservations SQL Server Database Project and Select **Publish** |
38 |
| - - Click Edit... to choose your connection string |
39 |
| - - Click Publish |
40 |
| - - Note: For publishing to Azure SQL you need to change the DB project target platform to **Microsoft Azure SQL Database V12** |
| 35 | +Languages: |
41 | 36 |
|
42 |
| -7. You can now run and debug the application locally by pressing **F5** in Visual Studio. |
| 37 | +- T-SQL |
43 | 38 |
|
44 |
| -8. Start the workload with the **Start** button, and run for a while to show perf profile. Then press stop to stop the workload. |
| 39 | +Authors: |
45 | 40 |
|
46 |
| -9. In the database project, |
47 |
| - - Change TicketReservations.sql to a memory-optimized table (instructions commented in the file itself) |
48 |
| - - Change InsertTicketReservations.sql to natively compiled (instructions in the same file) |
| 41 | +- github-user1;github-user2 |
49 | 42 |
|
50 |
| -10. Publish the database project to the same database – the tool will take care of making the necessary changes. |
51 |
| - Note that, as part of publication, the data is copied from the old disk-based table to the new memory-optimized table, so the longer you run the initial workload, the longer this publication takes. |
| 43 | +Last update: |
52 | 44 |
|
53 |
| -11. Go back to the app and run the workload again. No need to recompile or restart the application. |
| 45 | +- 04/29/2016 |
54 | 46 |
|
55 |
| -The perf gains from In-Memory OLTP as shown by the load generation app depend on two factors: |
56 |
| -- Hardware |
57 |
| - - more cores => higher perf gain |
58 |
| - - slower log IO => lower perf gain |
59 |
| -- Configuration settings in the load generator |
60 |
| - - more rows per transaction => higher perf gain |
61 |
| - - more reads per write => lower perf gain |
62 |
| - - default setting is 10 rows per transaction and 1 read per write |
| 47 | +<a name=before-you-begin></a> |
63 | 48 |
|
64 |
| -With default settings on one machine with 24 logical cores and relatively slow SSD for the log the app shows around performance 40X gain, and in this case the bottleneck was log IO. |
| 49 | +## Before you begin |
65 | 50 |
|
| 51 | +To run this sample, you need the following prerequisites. |
66 | 52 |
|
67 |
| -## About the code |
68 |
| -The code included in this sample is not intended to be a set of best practices on how to build scalable enterprise grade web applications. This is beyond the scope of this quick start sample. |
| 53 | +Software prerequisites: |
69 | 54 |
|
70 |
| -## More information |
71 |
| -- [In-Memory OLTP (In-Memory Optimization)] (https://msdn.microsoft.com/en-us/library/dn133186.aspx) |
72 |
| -- [OLTP and database management] (https://www.microsoft.com/en-us/server-cloud/solutions/oltp-database-management.aspx) |
| 55 | +<!-- Examples --> |
| 56 | +1. SQL Server 2016 (or higher) or an Azure SQL Database |
| 57 | +2. Visual Studio 2015 (or higher) with the latest SSDT installed |
| 58 | + |
| 59 | +Azure prerequisites: |
| 60 | + |
| 61 | +<!-- Examples --> |
| 62 | +1. Permission to create an Azure SQL Database |
| 63 | + |
| 64 | +<a name=run-this-sample></a> |
| 65 | + |
| 66 | +## Run this sample |
| 67 | + |
| 68 | +<!-- Step by step instructions. Here's a few examples --> |
| 69 | + |
| 70 | +1. From Visual Studio, open the **sample.sln** file from the root directory. |
| 71 | + |
| 72 | +2. In Visual Studio Build menu, select **Build Solution** (or Press F6). |
| 73 | + |
| 74 | +3. Step 3 ... |
| 75 | + |
| 76 | +<a name=sample-details></a> |
| 77 | + |
| 78 | +## Sample details |
| 79 | + |
| 80 | +Describe sample details |
| 81 | + |
| 82 | +<a name=disclaimers></a> |
| 83 | + |
| 84 | +## Disclaimers |
| 85 | +The code included in this sample is not intended to be ... |
| 86 | + |
| 87 | +<a name=related-links></a> |
| 88 | + |
| 89 | +## Related Links |
| 90 | +<!-- Links to more articles. Remember to delete "en-us" from the link path. --> |
| 91 | + |
| 92 | +For more information, see these articles: |
0 commit comments