explain.depesz.com

PostgreSQL's explain analyze made readable

Result: v8Ql

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

Result (cost=1,005.79..1,005.89 rows=2 width=228) (actual rows= loops=)

2.          

Initplan (for Result)

3. 0.000 0.000 ↓ 0.0

Function Scan on pg_show_all_settings a (cost=0.00..12.50 rows=5 width=32) (actual rows= loops=)

  • Filter: (name = 'shared_buffers'::text)
4. 0.000 0.000 ↓ 0.0

Sort (cost=993.28..993.29 rows=2 width=204) (actual rows= loops=)

  • Sort Key: (pg_size_pretty((count(*) * 8192))) DESC
5. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=993.17..993.27 rows=2 width=204) (actual rows= loops=)

  • Group Key: c.oid, n.nspname, c.relname
6. 0.000 0.000 ↓ 0.0

Sort (cost=993.17..993.18 rows=2 width=132) (actual rows= loops=)

  • Sort Key: c.oid, n.nspname, c.relname
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.32..993.16 rows=2 width=132) (actual rows= loops=)

  • Join Filter: (c.relnamespace = n.oid)
8. 0.000 0.000 ↓ 0.0

Seq Scan on pg_namespace n (cost=0.00..1.23 rows=23 width=68) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Materialize (cost=1.32..991.25 rows=2 width=72) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.32..991.24 rows=2 width=72) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.03..13.71 rows=5 width=4) (actual rows= loops=)

  • Hash Cond: (p.reldatabase = d.oid)
12. 0.000 0.000 ↓ 0.0

Function Scan on pg_buffercache_pages p (cost=0.00..10.00 rows=1,000 width=8) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Hash (cost=1.01..1.01 rows=1 width=4) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Seq Scan on pg_database d (cost=0.00..1.01 rows=1 width=4) (actual rows= loops=)

  • Filter: (datname = current_database())
15. 0.000 0.000 ↓ 0.0

Index Scan using pg_class_tblspc_relfilenode_index on pg_class c (cost=0.29..195.50 rows=1 width=76) (actual rows= loops=)

  • Index Cond: (relfilenode = p.relfilenode)
  • Filter: (pg_relation_size((oid)::regclass, 'main'::text) > 0)