How to determine the distribution style of a table in Redshift database

You can query the SVV_TABLE_INFO view to determine the distribution style of a table.

select "database", "schema", "table", "diststyle" from SVV_TABLE_INFO where "schema"='schemaname' and "table"='tablename';

Distribution style can be one of the 5 values – AUTO(ALL), AUTO(EVEN),ALL, EVEN, or KEY.

See also  [Amazon](500310) Invalid operation: Maximum number of stored procedures allowed exceeded