DROP CLUSTERING KEY
DROP CLUSTERING KEY
drops all clustering keys in a table.
Read our data_clustering guide for more information.
See also: CLUSTER BY, CREATE TABLE.
Permissions
The role must have the DDL
permission at the database or table level.
Syntax
alter_table_rename_table_statement ::=
ALTER TABLE [schema_name.]table_name DROP CLUSTERING KEY
;
table_name ::= identifier
Parameters
Parameter |
Description |
---|---|
|
The schema name for the table. Defaults to |
|
The table name to apply the change to. |
Usage notes
Removing clustering keys does not affect existing data.
To force data to re-cluster, the table has to be recreated (i.e. with CREATE TABLE AS).
Examples
Dropping clustering keys in a table
ALTER TABLE public.users DROP CLUSTERING KEY