Using ttIsql to Manage ODBC Functions
You can perform the following on ODBC functions within ttIsql:
Canceling ODBC Functions
The ttIsql command attempts to cancel an ongoing ODBC function when the user presses Ctrl-C.
Timing ODBC Function Calls
Information on the time required to run common ODBC function calls can be displayed
by using the ttIsql
timing
command.
When the timing feature is enabled many built-in ttIsql
commands
report the elapsed runtime associated with the primary ODBC function call corresponding
to the ttIsql
command.
For example, when running the ttIsql
connect
command several ODBC function calls run, however, the primary
ODBC function call associated with connect
is
SQLDriverConnect
and this is the function call that is timed and
reported as shown below.
Command> timing 1; Command> connect "DSN=database1"; Connection successful: DSN=database1;DataStore=/disk1/databases/database1;DatabaseCharacterSet=AL32UTF8; ConnectionCharacterSet=AL32UTF8;PermSize=128; (Default setting AutoCommit=1) Execution time (SQLDriverConnect) = 1.2626 seconds. Command>
In the example above, the SQLDriverConnect
call took about 1.26 seconds to run.
When using the timing
command to measure queries, the time required to run the query plus the time required to fetch the query results is measured. To avoid measuring the time to format and print query results to the display, set the verbosity level to 0 before running the query.
Command> timing 1; Command> verbosity 0; Command> SELECT * FROM t1; Execution time (SQLExecute + FetchLoop) = 0.064210 seconds. Command>