Cum afli mai multe despre coloanele unui tabel
Au apărut câteva probleme de performanță și echipa ți-a cerut să investighezi tabelul cu datele meteo din comitatul de cafea, pentru a identifica ce se întâmplă. Ai decis să verifici dacă există DISTKEY sau SORTKEY-uri definite pe tabel.
Acest exercițiu face parte din cursul
Introducere în Redshift
Instrucțiuni pentru exercițiu
- Selectează
column_name,distkeyșisortkeydin view-ul de sistemSVV_REDSHIFT_COLUMNSpentru tabelulpublic_intro_redshift.coffee_county_weather
Exercițiu interactiv practic
Încearcă acest exercițiu completând acest cod de exemplu.
-- 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 = '___';