cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate commit statements for a given time period?

0 Kudos
1,103

Hello, Team We need to provide estimated (average) number of transactions per minute on a specific DB for an integration company.

Is there a way to get this data out of SQL Anywhere server 16?

Thank you

Accepted Solutions (0)

Answers (1)

Answers (1)

VolkerBarth
Contributor
0 Kudos

Here's a wild guess: Use the database server properties for number of commits and rollbacks since the server has been started, such as

select
   cast(property('Commit') as bigint) as CommitCount,
   cast(property('Rlbk') as bigint) as RollbackCount,
   cast(datediff(minute, cast(property('StartTime') as datetime),
                         current timestamp) as double) as ServerRuntimeInMinutes ,
   (CommitCount + RollbackCount) / ServerRuntimeInMinutes as AverageTxnRatePerMinute

If you need that for a particular interval, just store the results at the start and end of the according interval and compare those.

Commits and rollbacks can also be counted per connection or per database with the same property names using the connection_property() resp. db_property() functions.

0 Kudos

Thank you, This would be enough for me to create a procedure, which calculates the data across the range of seconds.

VolkerBarth
Contributor
0 Kudos

Well, if it really answers your question, feel free to accept this answer:)