DROP STATISTICS
DROP STATISTICS
7
SQL - Language Statements
DROP STATISTICS
remove extended statistics
DROP STATISTICS [ IF EXISTS ] name [, ...]
Description
DROP STATISTICS removes statistics from the database.
Only the statistics owner, the schema owner, and superuser can drop a
statistics.
Parameters
IF EXISTS
Do not throw an error if the statistics do not exist. A notice is
issued in this case.
name
The name (optionally schema-qualified) of the statistics to drop.
Examples
To destroy two statistics objects on different schemas, without failing
if they don't exist:
DROP STATISTICS IF EXISTS
accounting.users_uid_creation,
public.grants_user_role;
Compatibility
There's no DROP STATISTICS command in the SQL standard.
See Also