1DROP STATISTICS(7) PostgreSQL 15.4 Documentation DROP STATISTICS(7)
2
3
4
6 DROP_STATISTICS - remove extended statistics
7
9 DROP STATISTICS [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
10
12 DROP STATISTICS removes statistics object(s) from the database. Only
13 the statistics object's owner, the schema owner, or a superuser can
14 drop a statistics object.
15
17 IF EXISTS
18 Do not throw an error if the statistics object does not exist. A
19 notice is issued in this case.
20
21 name
22 The name (optionally schema-qualified) of the statistics object to
23 drop.
24
25 CASCADE
26 RESTRICT
27 These key words do not have any effect, since there are no
28 dependencies on statistics.
29
31 To destroy two statistics objects in different schemas, without failing
32 if they don't exist:
33
34 DROP STATISTICS IF EXISTS
35 accounting.users_uid_creation,
36 public.grants_user_role;
37
39 There is no DROP STATISTICS command in the SQL standard.
40
42 ALTER STATISTICS (ALTER_STATISTICS(7)), CREATE STATISTICS
43 (CREATE_STATISTICS(7))
44
45
46
47PostgreSQL 15.4 2023 DROP STATISTICS(7)