Application Programming Interface Guide > Built-in Procedures > Procedures Reference > SqlPerf
 
SqlPerf
Run a SQL performance test. Each worker thread runs in a tight loop for the specified amount of time. With each iteration, a new transaction is created, the specified query is executed, and results are retrieved into TDV for evaluation and then discarded.
Location
/lib/resource/
Inputs
sql: Any valid SELECT statement in TDV SQL.
threads: Number of worker threads to use.
duration: Time in seconds.
Outputs
numExecutions: Total number of times the query was executed.
queriesPerSecond: Throughput.
rowsPerQuery: Number or rows the query returns.
queryTimeMillis: Average time to execute the query, in milliseconds.
queryTimeMillisMin: Minimum time in milliseconds to execute the query and retrieve results.
queryTimeMillisMax: Maximum time in milliseconds to execute the query and retrieve results.