explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nwGd

Settings
# exclusive inclusive rows x rows loops node
1. 3.297 3.631 ↓ 2.3 14 1

Result (cost=37.18..137.17 rows=6 width=296) (actual time=0.591..3.631 rows=14 loops=1)

  • Output: ((n.nspname)::character varying), ((c.relname)::character varying), ((a.attnum)::integer), ((a.attname)::character varying), ((t.typname)::character varying), a.attnotnull, (SubPlan 1), (SubPlan 2), (SubPlan 3), inndev_select_template_date_from_table_to_json((n_1.nspname)::text, (c_1.relname)::text, 10), c.relname, a.attnum
  • Buffers: shared hit=222
2. 0.019 0.096 ↓ 2.3 14 1

Sort (cost=37.18..37.20 rows=6 width=331) (actual time=0.091..0.096 rows=14 loops=1)

  • Output: ((n.nspname)::character varying), ((c.relname)::character varying), ((a.attnum)::integer), ((a.attname)::character varying), ((t.typname)::character varying), a.attnotnull, c.relname, a.attnum, c.oid, n_1.nspname, c_1.relname
  • Sort Key: a.attnum
  • Sort Method: quicksort Memory: 30kB
  • Buffers: shared hit=54
3. 0.015 0.077 ↓ 2.3 14 1

Nested Loop (cost=1.10..37.11 rows=6 width=331) (actual time=0.047..0.077 rows=14 loops=1)

  • Output: (n.nspname)::character varying, (c.relname)::character varying, (a.attnum)::integer, (a.attname)::character varying, (t.typname)::character varying, a.attnotnull, c.relname, a.attnum, c.oid, n_1.nspname, c_1.relname
  • Buffers: shared hit=54
4. 0.003 0.048 ↓ 2.3 14 1

Nested Loop (cost=0.83..35.07 rows=6 width=331) (actual time=0.040..0.048 rows=14 loops=1)

  • Output: c_1.relname, n_1.nspname, n.nspname, c.relname, c.oid, a.attnum, a.attname, a.attnotnull, a.atttypid
  • Buffers: shared hit=12
5. 0.001 0.035 ↑ 1.0 1 1

Nested Loop (cost=0.55..16.85 rows=1 width=260) (actual time=0.033..0.035 rows=1 loops=1)

  • Output: c_1.relname, n_1.nspname, n.nspname, c.relname, c.oid
  • Buffers: shared hit=8
6. 0.002 0.030 ↑ 1.0 1 1

Nested Loop (cost=0.27..10.55 rows=1 width=200) (actual time=0.028..0.030 rows=1 loops=1)

  • Output: n_1.nspname, n_1.oid, n.nspname, c.relname, c.oid
  • Join Filter: (n.nspname = n_1.nspname)
  • Rows Removed by Join Filter: 5
  • Buffers: shared hit=5
7. 0.001 0.021 ↑ 1.0 1 1

Nested Loop (cost=0.27..9.41 rows=1 width=132) (actual time=0.021..0.021 rows=1 loops=1)

  • Output: n.nspname, c.relname, c.oid
  • Join Filter: (n.oid = c.relnamespace)
  • Rows Removed by Join Filter: 2
  • Buffers: shared hit=4
8. 0.009 0.009 ↑ 1.0 1 1

Index Scan using pg_class_relname_nsp_index on pg_catalog.pg_class c (cost=0.27..8.29 rows=1 width=72) (actual time=0.009..0.009 rows=1 loops=1)

  • Output: c.relname, c.oid, c.relnamespace
  • Index Cond: (c.relname = 'inddev_client'::name)
  • Buffers: shared hit=3
9. 0.011 0.011 ↑ 1.0 3 1

Seq Scan on pg_catalog.pg_namespace n (cost=0.00..1.08 rows=3 width=68) (actual time=0.009..0.011 rows=3 loops=1)

  • Output: n.nspname, n.oid
  • Filter: (n.nspname <> ALL ('{information_schema,pg_catalog,pg_toast}'::name[]))
  • Rows Removed by Filter: 3
  • Buffers: shared hit=1
10. 0.007 0.007 ↑ 1.0 6 1

Seq Scan on pg_catalog.pg_namespace n_1 (cost=0.00..1.06 rows=6 width=68) (actual time=0.006..0.007 rows=6 loops=1)

  • Output: n_1.nspname, n_1.oid
  • Buffers: shared hit=1
11. 0.004 0.004 ↑ 1.0 1 1

Index Scan using pg_class_relname_nsp_index on pg_catalog.pg_class c_1 (cost=0.27..6.29 rows=1 width=72) (actual time=0.004..0.004 rows=1 loops=1)

  • Output: c_1.relname, c_1.relnamespace, c_1.reltype, c_1.reloftype, c_1.relowner, c_1.relam, c_1.relfilenode, c_1.reltablespace, c_1.relpages, c_1.reltuples, c_1.relallvisible, c_1.reltoastrelid, c_1.relhasindex, c_1.relisshared, c_1.relpersistence, c_1.relkind, c_1.relnatts, c_1.relchecks, c_1.relhasoids, c_1.relhaspkey, c_1.relhasrules, c_1.relhastriggers, c_1.relhassubclass, c_1.relrowsecurity, c_1.relforcerowsecurity, c_1.relispopulated, c_1.relreplident, c_1.relfrozenxid, c_1.relminmxid, c_1.relacl, c_1.reloptions
  • Index Cond: ((c_1.relname = 'inddev_client'::name) AND (c_1.relnamespace = n_1.oid))
  • Filter: (c_1.relkind = 'r'::"char")
  • Buffers: shared hit=3
12. 0.010 0.010 ↓ 2.3 14 1

Index Scan using pg_attribute_relid_attnum_index on pg_catalog.pg_attribute a (cost=0.28..18.16 rows=6 width=75) (actual time=0.006..0.010 rows=14 loops=1)

  • Output: a.attrelid, a.attname, a.atttypid, a.attstattarget, a.attlen, a.attnum, a.attndims, a.attcacheoff, a.atttypmod, a.attbyval, a.attstorage, a.attalign, a.attnotnull, a.atthasdef, a.attisdropped, a.attislocal, a.attinhcount, a.attcollation, a.attacl, a.attoptions, a.attfdwoptions
  • Index Cond: ((a.attrelid = c.oid) AND (a.attnum > 0))
  • Buffers: shared hit=4
13. 0.014 0.014 ↑ 1.0 1 14

Index Scan using pg_type_oid_index on pg_catalog.pg_type t (cost=0.27..0.32 rows=1 width=68) (actual time=0.001..0.001 rows=1 loops=14)

  • Output: t.typname, t.oid
  • Index Cond: (t.oid = a.atttypid)
  • Buffers: shared hit=42
14.          

SubPlan (forResult)

15. 0.182 0.182 ↓ 0.0 0 14

Seq Scan on pg_catalog.pg_index (cost=0.00..7.04 rows=1 width=1) (actual time=0.013..0.013 rows=0 loops=14)

  • Output: true
  • Filter: (pg_index.indisprimary AND (c.oid = pg_index.indrelid) AND (pg_index.indkey[0] = a.attnum))
  • Rows Removed by Filter: 138
  • Buffers: shared hit=70
16. 0.028 0.028 ↓ 0.0 0 14

Seq Scan on pg_catalog.pg_attrdef (cost=0.00..1.04 rows=1 width=32) (actual time=0.002..0.002 rows=0 loops=14)

  • Output: (pg_attrdef.adsrc)::character varying
  • Filter: ((c.oid = pg_attrdef.adrelid) AND (pg_attrdef.adnum = a.attnum))
  • Rows Removed by Filter: 5
  • Buffers: shared hit=14
17. 0.028 0.028 ↓ 0.0 0 14

Index Scan using pg_description_o_c_o_index on pg_catalog.pg_description (cost=0.28..8.30 rows=1 width=32) (actual time=0.002..0.002 rows=0 loops=14)

  • Output: (pg_description.description)::character varying
  • Index Cond: ((pg_description.objoid = c.oid) AND (a.attnum = pg_description.objsubid))
  • Buffers: shared hit=28