Skip to content

Commit 377f747

Browse files
committed
changing defaults to show better profile across different hardware
1 parent 9b26412 commit 377f747

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

samples/features/in-memory/ticket-reservations/DemoWorkload/App.Config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
<add key="ThreadCount" value="80" />
1111
<add key="ReadsPerWrite" value="1" />
1212
<add key="RequestCount" value="100000" />
13-
<add key="RowCount" value="10" />
13+
<add key="RowCount" value="100" />
1414
<add key="TransactionCount" value="1" />
1515
<add key="WorkloadIndex" value="0" />
16-
<add key="MaxTps" value="100" />
16+
<add key="MaxTps" value="40" />
1717
<add key="MaxLatchWaits" value="20000" />
1818
<add key="ClientSettingsProvider.ServiceUri" value="" />
1919
</appSettings>

samples/features/in-memory/ticket-reservations/TicketReservations/dbo/Stored Procedures/InsertReservationDetails.sql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/*
1+
2+
-- traditional T-SQL version of the stored procedure
23
CREATE PROCEDURE InsertReservationDetails(@TicketReservationID int, @LineCount int, @Comment NVARCHAR(1000), @FlightID int)
34
AS
45
BEGIN
@@ -10,9 +11,9 @@ BEGIN
1011
SET @loop += 1;
1112
END
1213
END
13-
*/
1414

1515

16+
/*
1617
-- natively compiled version of the stored procedure:
1718
CREATE PROCEDURE InsertReservationDetails(@TicketReservationID int, @LineCount int, @Comment NVARCHAR(1000), @FlightID int)
1819
WITH NATIVE_COMPILATION, SCHEMABINDING
@@ -28,3 +29,4 @@ BEGIN ATOMIC WITH (TRANSACTION ISOLATION LEVEL=SNAPSHOT, LANGUAGE=N'English')
2829
SET @loop += 1;
2930
END
3031
END
32+
*/

samples/features/in-memory/ticket-reservations/TicketReservations/dbo/Tables/TicketReservationDetail.sql

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@
55
FlightID INT NOT NULL,
66
Comment NVARCHAR (1000),
77
-- disk-based table:
8-
/*
8+
99
CONSTRAINT [PK_TicketReservationDetail] PRIMARY KEY CLUSTERED (TicketReservationDetailID)
1010
);
11-
*/
1211

12+
/*
1313
-- for memory-optimized, replace the last two lines with the following:
14-
CONSTRAINT [PK_TicketReservationDetail] PRIMARY KEY NONCLUSTERED (TicketReservationDetailID)
14+
CONSTRAINT [PK_TicketReservationDetail] PRIMARY KEY NONCLUSTERED HASH
15+
([TicketReservationDetailID]) WITH (BUCKET_COUNT=10000000)
1516
) WITH (MEMORY_OPTIMIZED=ON);
1617
GO
18+
*/
1719

1820
-- For SQL Server, include the following filegroup. For Azure DB, leave out the filegroup
19-
ALTER DATABASE [$(DatabaseName)] ADD FILEGROUP [mod] CONTAINS MEMORY_OPTIMIZED_DATA
21+
-- ALTER DATABASE [$(DatabaseName)] ADD FILEGROUP [mod] CONTAINS MEMORY_OPTIMIZED_DATA
2022

0 commit comments

Comments
 (0)