開始使用免費開始

深入了解資料表的欄位

最近遇到一些效能問題,團隊想請你調查 coffee county weather 這個資料表,看看能否找出原因。你決定先檢查該表是否有設定 DISTKEYSORTKEY

本練習屬於課程

Redshift 入門

檢視課程

練習說明

  • 從系統檢視表 SVV_REDSHIFT_COLUMNS 中,選取 public_intro_redshift.coffee_county_weather 這張表的 column_namedistkeysortkey 欄位。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

-- 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 = '___';
編輯並執行程式碼