To view the distribution style of a table, query the SVV_TABLE_INFO system catalog view. Then Amazon Redshift might change the distribution style or key of your table in the future.įor example, Amazon Redshift might convert a table with a DISTSTYLE of AUTO(KEY) to AUTO(EVEN), or vice versa.įor more information about DISTSTYLE AUTO, see If Amazon Redshift determines that a new distribution style or key will improve the performance of queries, In this case, Amazon Redshift makes no changes to the table. To reduce the time to run the ALTER TABLE command, you can combine some clauses ofĪmazon Redshift supports the following combinations of the ALTER TABLE clauses:Ī small table with DISTSTYLE ALL is converted to AUTO(ALL).Ī small table with DISTSTYLE EVEN is converted to AUTO(ALL).Ī small table with DISTSTYLE KEY is converted to AUTO(ALL).Ī large table with DISTSTYLE ALL is converted to AUTO(EVEN).Ī large table with DISTSTYLE EVEN is converted to AUTO(EVEN).Ī large table with DISTSTYLE KEY is converted to AUTO(KEY) and the DISTKEY is preserved. | DROP PARTITION ( partition_column= partition_value ) The following options apply only to external tables: | ALTER DISTSTYLE KEY DISTKEY column_name | ALTER COLUMN column_name ENCODE encode_type. | ALTER COLUMN column_name ENCODE encode_type, | ALTER COLUMN column_name ENCODE new_encode_type | ALTER COLUMN column_name TYPE new_data_type Table owner with the USAGE privilege on the schema
0 Comments
Leave a Reply. |