Forum: Building VoltDB Applications

Post: Query execution time

Query execution time
Feb 5, 2014
Just like the MySQL command line, is there any way to get the query execution time in the VoltDB sqlcmd?

I can use some JDBC client program to get the query time, but I dont want to include the connection times of the client to the DB. Was wondering if there is anyway we could get this.
Feb 5, 2014
VoltDB provides a set of "System Procedures" which give statistics such as query execution time. Please see You can execute these from sqlcmd as `exec @Statistics PROCEDUREPROFILE, 1`, as an example. There are several different statistics selectors in addition to PROCEDUREPROFILE.

The profile shows which queries are dominating the database (the weighted average of runtime and call frequency).

Feb 5, 2014
I should also mention that you can see the query plans for your database by browsing to http://<a-database-node>:8080/. You can browse that report to see procedures, some attributes about procedures and the SQL and execution plans for SQL in procedures.
Feb 5, 2014
Thanks so much for the quick followup. I still haven't figured out getting the query execution time.

I see nothing when I run this in sqlcmd. Also I haven't noticed any queries/procedures in http://localhost:8080/#p
exec @Statistics PLANNER, 1
exec @Statistics PROCEDURE, 1
`exec @Statistics PLANNER, 1`
`exec @Statistics PROCEDURE, 1`

All I want to see is how much time does it take to run a random query
I tried exec @Statistics PROCEDURE, `select col1 from table1 where col2=var1`, it dint work either.

Assuming the query is "select col1 from table1 where col2=var1", could you please show me the syntax to get the query time?