explain.depesz.com

PostgreSQL's explain analyze made readable

Result: b9rt

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.008 ↓ 0.0 0 1

------------------------------------------------------------------------------------------------------------------------------------------------------------- Nested Loop (cost=34.47..88.65 rows=1 width=128) (actual time=0.008..0.008 rows=0 loops=1)

  • Join Filter: (("*SELECT* 1".constraint_name)::name = "*SELECT* 1_1".conname)
2. 0.000 0.008 ↓ 0.0 0 1

Nested Loop (cost=12.35..42.25 rows=1 width=192) (actual time=0.008..0.008 rows=0 loops=1)

3. 0.000 0.008 ↓ 0.0 0 1

Hash Join (cost=12.07..41.68 rows=1 width=168) (actual time=0.008..0.008 rows=0 loops=1)

  • Hash Cond: (c.conname = ("*SELECT* 1".constraint_name)::name)
4. 0.000 0.008 ↓ 0.0 0 1

ProjectSet (cost=0.41..16.26 rows=1,000 width=341) (actual time=0.008..0.008 rows=0 loops=1)

5. 0.001 0.008 ↓ 0.0 0 1

Nested Loop (cost=0.41..11.00 rows=1 width=104) (actual time=0.008..0.008 rows=0 loops=1)

  • Join Filter: (c.connamespace = nc.oid)
6. 0.000 0.007 ↓ 0.0 0 1

Nested Loop (cost=0.41..9.87 rows=1 width=108) (actual time=0.007..0.007 rows=0 loops=1)

7. 0.001 0.008 ↓ 0.0 0 1

Nested Loop (cost=0.27..9.55 rows=1 width=112) (actual time=0.007..0.008 rows=0 loops=1)

8. 0.007 0.007 ↓ 0.0 0 1

Seq Scan on pg_constraint c (cost=0.00..1.03 rows=1 width=104) (actual time=0.007..0.007 rows=0 loops=1)

  • Filter: (contype = ANY ('{p,u,f}'::"char"[]))
  • Rows Removed by Filter: 2
9. 0.000 0.000 ↓ 0.0 0

Index Scan using pg_class_oid_index on pg_class r (cost=0.27..8.29 rows=1 width=12) (never executed)

  • Index Cond: (oid = c.conrelid)
  • Filter: (relkind = ANY ('{r,p}'::"char"[]))
10. 0.000 0.000 ↓ 0.0 0

Index Only Scan using pg_namespace_oid_index on pg_namespace nr (cost=0.13..0.27 rows=1 width=4) (never executed)

  • Index Cond: (oid = r.relnamespace)
  • Filter: (NOT pg_is_other_temp_schema(oid))
  • Heap Fetches: 0
11. 0.000 0.000 ↓ 0.0 0

Seq Scan on pg_namespace nc (cost=0.00..1.06 rows=6 width=4) (never executed)

12. 0.000 0.000 ↓ 0.0 0

Hash (cost=11.66..11.66 rows=1 width=64) (never executed)

13. 0.000 0.000 ↓ 0.0 0

Subquery Scan on *SELECT* 1 (cost=0.27..11.66 rows=1 width=64) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.27..11.65 rows=1 width=512) (never executed)

  • Join Filter: (r_1.relnamespace = nr_1.oid)
15. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.27..10.52 rows=1 width=68) (never executed)

  • Join Filter: (c_1.connamespace = nc_1.oid)
16. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.27..9.39 rows=1 width=72) (never executed)

  • Join Filter: (c_1.conrelid = r_1.oid)
17. 0.000 0.000 ↓ 0.0 0

Index Scan using pg_class_relname_nsp_index on pg_class r_1 (cost=0.27..8.32 rows=1 width=8) (never executed)

  • Index Cond: (relname = 'hw_group'::name)
  • Filter: ((relkind = ANY ('{r,p}'::"char"[])) AND (pg_has_role(relowner, 'USAGE'::text) OR has_table_privilege(oid, 'INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER'::text) OR has_any_column_privilege(oid, 'INSERT, UPDATE, REFERENCES'::text)))
18. 0.000 0.000 ↓ 0.0 0

Seq Scan on pg_constraint c_1 (cost=0.00..1.05 rows=1 width=72) (never executed)

  • Filter: ((contype <> ALL ('{t,x}'::"char"[])) AND ((CASE contype WHEN 'c'::"char" THEN 'CHECK'::text WHEN 'f'::"char" THEN 'FOREIGN KEY'::text WHEN 'p'::"char" THEN 'PRIMARY KEY'::text WHEN 'u'::"char" THEN 'UNIQUE'::text ELSE NULL::text END)::text = 'FOREIGN KEY'::text))
19. 0.000 0.000 ↓ 0.0 0

Seq Scan on pg_namespace nc_1 (cost=0.00..1.06 rows=6 width=4) (never executed)

20. 0.000 0.000 ↓ 0.0 0

Seq Scan on pg_namespace nr_1 (cost=0.00..1.07 rows=4 width=4) (never executed)

  • Filter: (NOT pg_is_other_temp_schema(oid))
21. 0.000 0.000 ↓ 0.0 0

Index Scan using pg_attribute_relid_attnum_index on pg_attribute a (cost=0.28..0.56 rows=1 width=70) (never executed)

  • Index Cond: ((attrelid = r.oid) AND (attnum = ((information_schema._pg_expandarray(c.conkey))).x))
  • Filter: ((NOT attisdropped) AND (pg_has_role(r.relowner, 'USAGE'::text) OR has_column_privilege(r.oid, attnum, 'SELECT, INSERT, UPDATE, REFERENCES'::text)))
22. 0.000 0.000 ↓ 0.0 0

Append (cost=22.11..46.37 rows=2 width=128) (never executed)

23. 0.000 0.000 ↓ 0.0 0

Subquery Scan on *SELECT* 1_1 (cost=22.11..22.14 rows=1 width=128) (never executed)

24. 0.000 0.000 ↓ 0.0 0

Unique (cost=22.11..22.13 rows=1 width=324) (never executed)

25. 0.000 0.000 ↓ 0.0 0

Sort (cost=22.11..22.12 rows=1 width=324) (never executed)

  • Sort Key: nr_2.nspname, r_2.relowner, a_1.attname, nc_2.nspname, c_2.conname
26. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.83..22.10 rows=1 width=324) (never executed)

  • Join Filter: (c_2.connamespace = nc_2.oid)
27. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.83..20.97 rows=1 width=264) (never executed)

  • Join Filter: (d.objid = c_2.oid)
28. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.83..19.92 rows=1 width=200) (never executed)

  • Join Filter: (r_2.relnamespace = nr_2.oid)
29. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.83..18.78 rows=1 width=140) (never executed)

30. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.56..18.41 rows=1 width=76) (never executed)

31. 0.000 0.000 ↓ 0.0 0

Index Scan using pg_depend_depender_index on pg_depend d (cost=0.28..10.11 rows=1 width=12) (never executed)

  • Index Cond: (classid = '2606'::oid)
  • Filter: (refclassid = '1259'::oid)
32. 0.000 0.000 ↓ 0.0 0

Index Scan using pg_attribute_relid_attnum_index on pg_attribute a_1 (cost=0.28..8.30 rows=1 width=70) (never executed)

  • Index Cond: ((attrelid = d.refobjid) AND (attnum = d.refobjsubid))
  • Filter: (NOT attisdropped)
33. 0.000 0.000 ↓ 0.0 0

Index Scan using pg_class_oid_index on pg_class r_2 (cost=0.27..0.32 rows=1 width=76) (never executed)

  • Index Cond: (oid = a_1.attrelid)
  • Filter: ((relkind = ANY ('{r,p}'::"char"[])) AND pg_has_role(relowner, 'USAGE'::text) AND (relname = 'hw_group_gclass'::name))
34. 0.000 0.000 ↓ 0.0 0

Seq Scan on pg_namespace nr_2 (cost=0.00..1.06 rows=6 width=68) (never executed)

35. 0.000 0.000 ↓ 0.0 0

Seq Scan on pg_constraint c_2 (cost=0.00..1.02 rows=2 width=72) (never executed)

  • Filter: (contype = 'c'::"char")
36. 0.000 0.000 ↓ 0.0 0

Seq Scan on pg_namespace nc_2 (cost=0.00..1.06 rows=6 width=68) (never executed)

37. 0.000 0.000 ↓ 0.0 0

Subquery Scan on *SELECT* 2 (cost=0.55..24.22 rows=1 width=128) (never executed)

38. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.55..24.21 rows=1 width=324) (never executed)

  • Join Filter: (c_3.connamespace = nc_3.oid)
39. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.55..23.08 rows=1 width=132) (never executed)

  • Join Filter: (r_3.relnamespace = nr_3.oid)
40. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.55..21.94 rows=1 width=136) (never executed)

41. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.28..21.57 rows=1 width=145) (never executed)

42. 0.000 0.000 ↓ 0.0 0

Seq Scan on pg_constraint c_3 (cost=0.00..1.03 rows=1 width=141) (never executed)

  • Filter: (contype = ANY ('{p,u,f}'::"char"[]))
43. 0.000 0.000 ↓ 0.0 0

Index Scan using pg_attribute_relid_attnum_index on pg_attribute a_2 (cost=0.28..20.53 rows=1 width=70) (never executed)

  • Index Cond: (attrelid = CASE c_3.contype WHEN 'f'::"char" THEN c_3.confrelid ELSE c_3.conrelid END)
  • Filter: ((NOT attisdropped) AND (attnum = ANY (CASE c_3.contype WHEN 'f'::"char" THEN c_3.confkey ELSE c_3.conkey END)))
44. 0.000 0.000 ↓ 0.0 0

Index Scan using pg_class_oid_index on pg_class r_3 (cost=0.27..0.32 rows=1 width=8) (never executed)

  • Index Cond: (oid = a_2.attrelid)
  • Filter: ((relkind = ANY ('{r,p}'::"char"[])) AND pg_has_role(relowner, 'USAGE'::text) AND (relname = 'hw_group_gclass'::name))
45. 0.000 0.000 ↓ 0.0 0

Seq Scan on pg_namespace nr_3 (cost=0.00..1.06 rows=6 width=4) (never executed)

46. 0.000 0.000 ↓ 0.0 0

Seq Scan on pg_namespace nc_3 (cost=0.00..1.06 rows=6 width=4) (never executed)

Planning time : 2.291 ms
Execution time : 0.133 ms