Does any one know how to measure the SQL transactions per second for a specifc database in SQL Server 2008?
Is there any way to calculate TPS (transaction per second) of SQL Server database? You can use the "Batch Requests/sec." PMON counter (under the SQL Statistics category) for an overall measure of database requests processed per second.
On decent "commodity hardware" (unless you invest into high performance SSDs) this is about what you can expect: SQLite: 30 inserts/s. MySQL: 80 inserts/s.
The Batch Requests/sec (in some literature referred as Batch Requests per Second) metric is SQL Server performance that provides information about the number of SQL batches SQL Server received in one second.
It's gathering the list of performance objects available on that server. Each server will have different lists of performance objects depending on what software is installed on that server: for example, SQL Server 2016 offers a different set of counters than SQL Server 2008.
DECLARE @cntr_value bigint
SELECT @cntr_value = cntr_value
FROM sys.dm_os_performance_counters
WHERE counter_name = 'transactions/sec'
AND object_name = 'SQLServer:Databases'
AND instance_name = 'YourDatabase'
WAITFOR DELAY '00:00:01'
SELECT cntr_value - @cntr_value
FROM sys.dm_os_performance_counters
WHERE counter_name = 'transactions/sec'
AND object_name = 'SQLServer:Databases'
AND instance_name = 'YourDatabase'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With