explain.depesz.com

PostgreSQL's explain analyze made readable

Result: c2wp : Optimization for: plan #yBaw

Settings

Optimization path:

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

Nested Loop Left Join (cost=424.63..499.21 rows=1 width=96) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=424.35..498.21 rows=1 width=196) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=423.92..497.18 rows=1 width=200) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Merge Join (cost=423.64..424.19 rows=1 width=136) (actual rows= loops=)

  • Merge Cond: ((((nc.nspname)::information_schema.sql_identifier)::text) = (((nc_1.nspname)::information_schema.sql_identifier)::text))
5. 0.000 0.000 ↓ 0.0

Sort (cost=4.94..5.07 rows=53 width=68) (actual rows= loops=)

  • Sort Key: (((nc.nspname)::information_schema.sql_identifier)::text)
6. 0.000 0.000 ↓ 0.0

Seq Scan on pg_namespace nc (cost=0.00..3.42 rows=53 width=68) (actual rows= loops=)

  • Filter: ((NOT pg_is_other_temp_schema(oid)) AND (((nspname)::information_schema.sql_identifier)::text <> ALL ('{information_schema,pg_catalog}'::text[])))
7. 0.000 0.000 ↓ 0.0

Sort (cost=418.71..418.71 rows=1 width=132) (actual rows= loops=)

  • Sort Key: (((nc_1.nspname)::information_schema.sql_identifier)::text)
8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4.68..418.70 rows=1 width=132) (actual rows= loops=)

  • Join Filter: (t_1.typnamespace = nt_1.oid)
9. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=4.68..414.87 rows=1 width=136) (actual rows= loops=)

  • Join Filter: (t_1.typtype = 'd'::"char")
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4.26..414.26 rows=1 width=141) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3.98..409.59 rows=1 width=136) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash Join (cost=3.69..267.59 rows=5 width=72) (actual rows= loops=)

  • Hash Cond: (c_1.relnamespace = nc_1.oid)
13. 0.000 0.000 ↓ 0.0

Seq Scan on pg_class c_1 (cost=0.00..263.82 rows=7 width=12) (actual rows= loops=)

  • Filter: ((relkind = ANY ('{r,v,f}'::"char"[])) AND (((relname)::information_schema.sql_identifier)::text = ((relname)::information_schema.sql_identifier)::text))
14. 0.000 0.000 ↓ 0.0

Hash (cost=3.01..3.01 rows=54 width=68) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Seq Scan on pg_namespace nc_1 (cost=0.00..3.01 rows=54 width=68) (actual rows= loops=)

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

Index Scan using pg_attribute_relid_attnum_index on pg_attribute a (cost=0.29..28.39 rows=1 width=78) (actual rows= loops=)

  • Index Cond: ((attrelid = c_1.oid) AND (attnum > 0))
  • Filter: ((NOT attisdropped) AND (((attname)::information_schema.sql_identifier)::text ~~* '%index%'::text) AND (pg_has_role(c_1.relowner, 'USAGE'::text) OR has_column_privilege(c_1.oid, attnum, 'SELECT, INSERT, UPDATE, REFERENCES'::text)))
17. 0.000 0.000 ↓ 0.0

Index Scan using pg_type_oid_index on pg_type t_1 (cost=0.28..4.66 rows=1 width=13) (actual rows= loops=)

  • Index Cond: (oid = a.atttypid)
18. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..0.60 rows=1 width=4) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Index Scan using pg_type_oid_index on pg_type bt (cost=0.28..0.42 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (t_1.typbasetype = oid)
20. 0.000 0.000 ↓ 0.0

Index Only Scan using pg_namespace_oid_index on pg_namespace nbt (cost=0.14..0.16 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (oid = bt.typnamespace)
21. 0.000 0.000 ↓ 0.0

Seq Scan on pg_namespace nt_1 (cost=0.00..2.81 rows=81 width=4) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Index Scan using pg_class_relname_nsp_index on pg_class c (cost=0.28..72.98 rows=1 width=73) (actual rows= loops=)

  • Index Cond: (relnamespace = nc.oid)
  • Filter: ((relkind = ANY ('{r,v,f}'::"char"[])) AND (((CASE WHEN (nc.oid = pg_my_temp_schema()) THEN 'LOCAL TEMPORARY'::text WHEN (relkind = 'r'::"char") THEN 'BASE TABLE'::text WHEN (relkind = 'v'::"char") THEN 'VIEW'::text WHEN (relkind = 'f'::"char") THEN 'FOREIGN TABLE'::text ELSE NULL::text END)::information_schema.character_data)::text = 'BASE TABLE'::text) AND (pg_has_role(relowner, 'USAGE'::text) OR has_table_privilege(oid, 'SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER'::text) OR has_any_column_privilege(oid, 'SELECT, INSERT, UPDATE, REFERENCES'::text)))
23. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..1.02 rows=1 width=4) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Index Scan using pg_type_oid_index on pg_type t (cost=0.28..0.85 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (c.reloftype = oid)
25. 0.000 0.000 ↓ 0.0

Index Only Scan using pg_namespace_oid_index on pg_namespace nt (cost=0.14..0.16 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (oid = t.typnamespace)
26. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.28..0.98 rows=1 width=4) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Index Scan using pg_collation_oid_index on pg_collation co (cost=0.14..0.40 rows=1 width=72) (actual rows= loops=)

  • Index Cond: (a.attcollation = oid)
28. 0.000 0.000 ↓ 0.0

Index Scan using pg_namespace_oid_index on pg_namespace nco (cost=0.14..0.58 rows=1 width=68) (actual rows= loops=)

  • Index Cond: (oid = co.collnamespace)
  • Filter: ((nspname <> 'pg_catalog'::name) OR (co.collname <> 'default'::name))