timing ODBC関数コール

一般的なODBC関数コールの実行に必要な時間に関する情報は、timingコマンドを使用して表示できます。

タイミング機能が有効になっている場合は、多くの組込みttIsqlコマンドによって、ttIsqlコマンドに対応する主要ODBC関数コールの経過実行時間がレポートされます。

この例では、connectコマンドの実行時に、いくつかのODBC関数コールが実行されますが、connectに関連付けられている主要なODBC関数コールはSQLDriverConnectです。この関数コールは、測定およびレポートされます。

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>

SQLDriverConnectコールの実行には約1.26秒かかりました。

問合せを測定するtimingコマンドを使用すると、問合せの実行に必要な時間および問合せ結果のフェッチに必要な時間が測定されます。問合せ結果を書式設定して表示する時間の測定を回避するには、問合せを実行する前にverbosityレベルを0に設定します。

Command> timing 1;
Command> verbosity 0;
Command> SELECT * FROM t1;
Execution time (SQLExecute + FetchLoop) = 0.064210 seconds.

Command> timing 1;
Command> prepare 2 select 2 from dual;
Execution time (SQLPrepare) = 0.000385 seconds.
Command> exec 2;
Execution time (SQLExecute) = 0.000042 seconds.
Command> verbosity 0;
Command> fetchall 2;
Execution time (Fetch Loop) = 0.000050 seconds.