SYS_RESTORE_LOG
SYS_RESTORE_LOG を使用して、RA3 ノードへの従来のサイズ変更中のクラスター内の各テーブルについて、移行の進行状況をモニタリングします。サイズ変更操作中のデータ移行の履歴スループットをキャプチャします。RA3 ノードへの従来のサイズ変更について詳しくは、「従来のサイズ変更」を参照してください。
SYS_RESTORE_LOG は、スーパーユーザーにのみ表示されます。
テーブルの列
列名 | データ型 | 説明 |
---|---|---|
event_time | timestamp | ログエントリがいつ記録されるかを示すタイムスタンプ。 |
database_name | char(128) | データベースの名前。 |
schema_name | char(128) | スキーマの名前。 |
table_name | char(128) | テーブルの名前。 |
table_id | integer | テーブルの ID。 |
action | char(128) | エントリ時に実行されたアクション。値には、「移行開始」、「チェックポイント」、「再開」、「完了」、「キャンセル」、「リセット」などがあります。 |
table_size | long | テーブルのサイズ。 |
total_data_processed | long | この時点でテーブル用に処理されたデータのサイズ (MB 単位)。 |
delta_data_processed | long | event_time の前回の更新以降に処理されたデータのサイズ(MB 単位)。これは、前回記録された時間間隔以降に処理されたデータの量を判断するのに役立ちます。これを table_size と比較すると、データ処理がどれだけ速く進んでいるかがわかります。 |
message | char(512) | アクション列の値の詳細な説明。 |
redistribution_type | char(32) | テーブルの再分散タイプ。KEY 変換または EVEN リバランスタスクのいずれか。分散スタイルの詳細については、「分散スタイル」を参照してください。 |
サンプルクエリ
次のクエリは、SYS_RESTORE_LOG を使用してデータ処理のスループットを計算します。
SELECT ROUND(sum(delta_data_processed) / 1024.0, 2) as data_processed_gb, ROUND(datediff(sec, min(event_time), max(event_time)) / 3600.0, 2) as duration_hr, ROUND(data_processed_gb/duration_hr, 2) as throughput_gb_per_hr from sys_restore_log;
サンプル出力。
data_processed_gb | duration_hr | throughput_gb_per_hr -------------------+-------------+---------------------- 0.91 | 8.37 | 0.11 (1 row)
次のクエリは、すべての再分散タイプを表示します。
SELECT * from sys_restore_log ORDER BY event_time;
database_name | schema_name | table_name | table_id | action | total_data_processed | delta_data_processed | event_time | table_size | message | redistribution_type ---------------+----------------------+----------------------+----------+-----------------------------+----------------------+----------------------+----------------------------+------------+---------+-------------------------- dev | schemaaaa877096d844d | customer_key | 106424 | Redistribution started | 0 | | 2024-01-05 02:18:00.744977 | 325 | | Restore Distkey Table dev | schemaaaa877096d844d | dp30907_t2_autokey | 106430 | Redistribution started | 0 | | 2024-01-05 02:18:02.756675 | 90 | | Restore Distkey Table dev | schemaaaa877096d844d | dp30907_t2_autokey | 106430 | Redistribution completed | 90 | 90 | 2024-01-05 02:23:30.643718 | 90 | | Restore Distkey Table dev | schemaaaa877096d844d | customer_key | 106424 | Redistribution completed | 325 | 325 | 2024-01-05 02:23:45.998249 | 325 | | Restore Distkey Table dev | schemaaaa877096d844d | dp30907_t1_even | 106428 | Redistribution started | 0 | | 2024-01-05 02:23:46.083849 | 30 | | Rebalance Disteven Table dev | schemaaaa877096d844d | dp30907_t5_auto_even | 106436 | Redistribution started | 0 | | 2024-01-05 02:23:46.855728 | 45 | | Rebalance Disteven Table dev | schemaaaa877096d844d | dp30907_t5_auto_even | 106436 | Redistribution completed | 45 | 45 | 2024-01-05 02:24:16.343029 | 45 | | Rebalance Disteven Table dev | schemaaaa877096d844d | dp30907_t1_even | 106428 | Redistribution completed | 30 | 30 | 2024-01-05 02:24:20.584703 | 30 | | Rebalance Disteven Table dev | schemaefd028a2a48a4c | customer_even | 130512 | Redistribution started | 0 | | 2024-01-05 04:54:55.641741 | 190 | | Restore Disteven Table dev | schemaefd028a2a48a4c | customer_even | 130512 | Redistribution checkpointed | 29.4342113157737 | 29.4342113157737 | 2024-01-05 04:55:04.770696 | 190 | | Restore Disteven Table (8 rows)