explain.depesz.com

PostgreSQL's explain analyze made readable

Result: q9wH : Optimization for: plan #ljFZ

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.165 1.817 ↑ 1.0 1 1

Aggregate (cost=80.91..80.92 rows=1 width=32) (actual time=1.817..1.817 rows=1 loops=1)

2. 0.011 1.652 ↓ 6.5 13 1

Subquery Scan on t (cost=80.87..80.90 rows=2 width=24) (actual time=1.645..1.652 rows=13 loops=1)

3. 0.017 1.641 ↓ 6.5 13 1

Sort (cost=80.87..80.88 rows=2 width=140) (actual time=1.640..1.641 rows=13 loops=1)

  • Sort Key: ((a.attnum)::information_schema.cardinal_number)
  • Sort Method: quicksort Memory: 26kB
4. 0.910 1.624 ↓ 6.5 13 1

Nested Loop Left Join (cost=2.08..80.86 rows=2 width=140) (actual time=0.611..1.624 rows=13 loops=1)

5. 0.005 0.675 ↓ 6.5 13 1

Nested Loop Left Join (cost=1.67..76.70 rows=2 width=1,016) (actual time=0.276..0.675 rows=13 loops=1)

  • Join Filter: (dep.refobjsubid = a.attnum)
6. 0.010 0.501 ↓ 6.5 13 1

Nested Loop (cost=1.23..46.37 rows=2 width=1,020) (actual time=0.255..0.501 rows=13 loops=1)

7. 0.019 0.465 ↓ 6.5 13 1

Nested Loop Left Join (cost=1.10..46.01 rows=2 width=960) (actual time=0.250..0.465 rows=13 loops=1)

8. 0.014 0.420 ↓ 6.5 13 1

Nested Loop Left Join (cost=0.96..45.66 rows=2 width=707) (actual time=0.246..0.420 rows=13 loops=1)

  • Join Filter: (t_1.typtype = 'd'::"char")
9. 0.013 0.380 ↓ 6.5 13 1

Nested Loop (cost=0.55..44.43 rows=2 width=637) (actual time=0.241..0.380 rows=13 loops=1)

10. 0.007 0.289 ↓ 6.5 13 1

Nested Loop (cost=0.28..43.80 rows=2 width=345) (actual time=0.231..0.289 rows=13 loops=1)

11. 0.003 0.219 ↑ 1.0 1 1

Nested Loop (cost=0.00..27.91 rows=1 width=8) (actual time=0.210..0.219 rows=1 loops=1)

  • Join Filter: (c.relnamespace = nc.oid)
  • Rows Removed by Join Filter: 4
12. 0.207 0.207 ↑ 1.0 1 1

Seq Scan on pg_class c (cost=0.00..26.79 rows=1 width=12) (actual time=0.198..0.207 rows=1 loops=1)

  • Filter: ((relkind = ANY ('{r,v,f,p}'::"char"[])) AND (((relname)::information_schema.sql_identifier)::text = 'event_description'::text))
  • Rows Removed by Filter: 523
13. 0.009 0.009 ↓ 1.2 5 1

Seq Scan on pg_namespace nc (cost=0.00..1.07 rows=4 width=4) (actual time=0.006..0.009 rows=5 loops=1)

  • Filter: (NOT pg_is_other_temp_schema(oid))
  • Rows Removed by Filter: 2
14. 0.063 0.063 ↓ 4.3 13 1

Index Scan using pg_attribute_relid_attnum_index on pg_attribute a (cost=0.28..15.85 rows=3 width=341) (actual time=0.019..0.063 rows=13 loops=1)

  • Index Cond: ((attrelid = c.oid) AND (attnum > 0))
  • Filter: ((NOT attisdropped) AND (pg_has_role(c.relowner, 'USAGE'::text) OR has_column_privilege(c.oid, attnum, 'SELECT, INSERT, UPDATE, REFERENCES'::text)))
15. 0.078 0.078 ↑ 1.0 1 13

Index Scan using pg_type_oid_index on pg_type t_1 (cost=0.27..0.32 rows=1 width=296) (actual time=0.006..0.006 rows=1 loops=13)

  • Index Cond: (oid = a.atttypid)
16. 0.000 0.026 ↓ 0.0 0 13

Nested Loop (cost=0.41..0.60 rows=1 width=74) (actual time=0.002..0.002 rows=0 loops=13)

17. 0.026 0.026 ↓ 0.0 0 13

Index Scan using pg_type_oid_index on pg_type bt (cost=0.27..0.42 rows=1 width=14) (actual time=0.002..0.002 rows=0 loops=13)

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

Index Scan using pg_namespace_oid_index on pg_namespace nbt (cost=0.13..0.17 rows=1 width=68) (never executed)

  • Index Cond: (oid = bt.typnamespace)
19. 0.026 0.026 ↑ 1.0 1 13

Index Scan using pg_attrdef_adrelid_adnum_index on pg_attrdef ad (cost=0.14..0.17 rows=1 width=259) (actual time=0.002..0.002 rows=1 loops=13)

  • Index Cond: ((a.attrelid = adrelid) AND (a.attnum = adnum))
20. 0.026 0.026 ↑ 1.0 1 13

Index Scan using pg_namespace_oid_index on pg_namespace nt (cost=0.13..0.17 rows=1 width=68) (actual time=0.002..0.002 rows=1 loops=13)

  • Index Cond: (oid = t_1.typnamespace)
21. 0.026 0.169 ↓ 0.0 0 13

Nested Loop (cost=0.43..15.16 rows=1 width=8) (actual time=0.013..0.013 rows=0 loops=13)

22. 0.130 0.130 ↑ 1.0 1 13

Index Scan using pg_depend_reference_index on pg_depend dep (cost=0.28..8.31 rows=1 width=12) (actual time=0.004..0.010 rows=1 loops=13)

  • Index Cond: ((refclassid = '1259'::oid) AND (refobjid = c.oid))
  • Filter: ((classid = '1259'::oid) AND (deptype = 'i'::"char"))
  • Rows Removed by Filter: 19
23. 0.013 0.013 ↓ 0.0 0 13

Index Only Scan using pg_sequence_seqrelid_index on pg_sequence seq (cost=0.15..6.84 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=13)

  • Index Cond: (seqrelid = dep.objid)
  • Heap Fetches: 0
24. 0.007 0.039 ↓ 0.0 0 13

Nested Loop (cost=0.41..0.52 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=13)

25. 0.026 0.026 ↓ 0.0 0 13

Index Scan using pg_collation_oid_index on pg_collation co (cost=0.28..0.34 rows=1 width=72) (actual time=0.002..0.002 rows=0 loops=13)

  • Index Cond: (a.attcollation = oid)
26. 0.006 0.006 ↓ 0.0 0 2

Index Scan using pg_namespace_oid_index on pg_namespace nco (cost=0.13..0.17 rows=1 width=68) (actual time=0.003..0.003 rows=0 loops=2)

  • Index Cond: (oid = co.collnamespace)
  • Filter: ((nspname <> 'pg_catalog'::name) OR (co.collname <> 'default'::name))
  • Rows Removed by Filter: 1
Planning time : 2.872 ms
Execution time : 1.965 ms