I have an instance of SQL Server that I am trying to benchmark. From the SQL Studio application I can type
SET STATISTICS TIME ON
and see outputted statistics after that. From C++ code, I can do something like
SQLExecDirect(hstmt, "SET STATISTICS TIME ON", SQL_NTS);
and then retrieve these statistics via SQLError
.
Is there a way to get at these statistics when accessing SQL Server over vanilla ODBC. In this case I am using Ruby's DBI:ODBC
connector which works fine to connect and run queries but I haven't been able to figure out this meta stuff.