Measuring SQL performances

Build 1501 on 14/Nov/2017  This topic last edited on: 5/Aug/2014, at 16:36

You can try to measure the GN4 SQL server performances with the following non-destructive test. Note: do it out of the production hours as the test puts a load on the database, and however, the results are more realistic if there's no other database activity.. The query takes about 1 minute to complete. You may want to repeat the test more times, and then calculate the average.

The expected value may be in the range of 1,900 (medium) to 3,400 (good).

To measure SQL performances

1.Launch SQL Server Management Studio and the sign in.

2.Select one of databases (but not master database).

3.Click New Query button, and then paste the following query in the query pane.

4.Wait for the query to complete and display results (one line only).

5.Write down the number of transactions per second.

Click to toggle graphic size

The query code

set nocount on

 

create table _PerfTestTable (Id int, [Date] datetime)

 

declare @count int

declare @t datetime

declare @i int

 

select @count = 100000

select @i = 0

select @t = getdate()

while (select @i)<@count

begin

insert _PerfTestTable(Id, [Date]) values(@i, getdate())

 select @i = @i + 1

end

select convert(float, @count)/((datediff(ms, @t, getdate())/1000)) 'Transactions/sec'

 

drop table _PerfTestTable