テーブルの列情報を詳しく知る
パフォーマンスに問題が発生しており、原因を特定できるかどうか、coffee county weather テーブルを調査してほしいとチームから依頼がありました。まず、このテーブルに設定されている可能性のある DISTKEY や SORTKEY を確認することにしました。
この演習はコースの一部です
Redshift入門
演習の手順
SVV_REDSHIFT_COLUMNSシステムビューから、public_intro_redshift.coffee_county_weatherテーブルのcolumn_name、distkey、sortkeyを選択してください
実践的なインタラクティブ演習
このサンプルコードを完成させて、この演習に挑戦してみましょう。
-- View the distkey and sortkey status of each column
SELECT column_name,
___,
___
-- Use the proper system view
FROM ___
-- Only in the proper schema
WHERE schema_name = '___'
-- For the proper table
AND table_name = '___';