以下の内容はhttps://yohei-a.hatenablog.jp/entry/20241218/1734508252より取得しました。


Amazon Redshift で実行時間の長いクエリの性能情報を取得する

\timing on
\pset pager

-- show Redshift version
select version();

-- show table stats
select * from svv_table_info;

-- show sort keys
set search_path to '$user', public;
select * from pg_table_def
where sortkey <> 0
and schemaname  not in ('pg_catalog')
order by schemaname, tablename, sortkey;


-- execution plan & stats
select a.*, b.* from sys_query_detail a, sys_query_explain b
	where  a.query_id = b.query_id
		and b.plan_node_id = a.plan_node_id
order by a.query_id, a.stream_id, a.segment_id, a.step_id;

--svl_query_metrics_summary
select * from svl_query_metrics_summary  order by query_execution_time desc;



以上の内容はhttps://yohei-a.hatenablog.jp/entry/20241218/1734508252より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14