[英]How to get a list of columns on which the sort key is applied in a table using aws redshift
I want to see, which columns of a table have the Sort key (Compound / Interleaved) applied.我想查看表格的哪些列应用了排序键(复合/交错)。
I found this documentation where we can filter the table and see sort keys respectively.我找到了这个文档,我们可以在其中过滤表格并分别查看排序键。
SELECT column_name, data_type, distkey, sortkey
FROM svv_redshift_columns
WHERE schema_name = 'SCHEMA_NAME_HERE'
AND TABLE_NAME = 'TABLE_NAME_HERE'
AND isnull(sortkey, 0) != 0
ORDER BY sortkey
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.