Q 質問 Oracleを利用しています。SQL文が原因でパフォーマンスが悪くなっているようです。「トレースを取って調べてみろ」と言われましたが,どうすれば良いのか分かりません A 回答 ALTER SESSIONで取得した統計情報から,キャッシュのヒット率や実行計画などを調べます OracleのSQLトレース機能を利用すると,データベースで実行されたそれぞれのSQL文について,(1)解析,実行,取り出しの回数,(2)CPU処理時間や経過時間,(3)物理的な読み込みと論理的な読み込みのブロック数,(4)処理したレコード数などが調べられます。 トレースを取得する方法は,主に2通りあります。一つは現行セッションのトレースを取る方法,もう一つはデータベース・インスタンス全体のトレースを取る方法です。 前者は,“ALTER SESSION SET sql_trace = true”というSQL文を実