OSを含めた各種のパフォーマンス情報を取得できるように、システムビューを拡張し、提供しています。拡張したシステムビューそれぞれの表形式を以下に示します。
-pgx_query_response
SQL文の平均実行時間を確認することができます。
列名 | データ型 | 説明 |
---|---|---|
userid | oid | 文を実行したユーザーのOID |
dbid | oid | 文が実行されたデータベースのOID |
query | text | 文のテキスト (track_activity_query_sizeバイトまで) |
calls | bigint | 実行回数 |
total_time | double precision | 文処理に費やした総時間(ミリ秒単位) |
average_time | double precision | 文処理に費やした平均時間(1回の実行当たり) |
-pgx_log
ログを1メッセージ1レコードとしてみることができます。
列名 | データ型 | 説明 |
---|---|---|
log_time | timestamp(3) with time zone | ログの出力された時間 |
user_name | text | ユーザー名 |
database_name | text | データベース名 |
process_id | integer | プロセスID |
connection_from | text | クライアントホストとポート番号 |
session_id | text | セッションID |
session_line_num | bigint | セッション前行番号 |
command_tag | text | コマンドタグ |
session_start_time | timestamp with time zone | セッションの開始時間 |
virtual_transaction_id | text | 仮想トランザクションID |
transaction_id | bigint | トランザクションID |
error_severity | text | エラーの深刻度 |
sql_state_code | text | SQL状態コード |
message | text | エラーメッセージ |
detail | text | 詳細エラーメッセージ |
hint | text | ヒント |
internal_query | text | エラーとなった内部的な問合せ |
internal_query_pos | integer | 内部問合せにおけるエラー位置の文字数 |
context | text | エラーの文脈 |
query | text | 問合せ |
query_pos | integer | 問合せにおけるエラー位置の文字数 |
location | text | PostgreSQLソースコード上のエラー発生場所 |
application_name | text | アプリケーション名 |