explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ONrX : Optimization for: plan #tzm

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.015 0.189 ↑ 12.5 8 1

Hash Left Join (cost=2.18..5.69 rows=100 width=440) (actual time=0.178..0.189 rows=8 loops=1)

  • Output: s.datid, d.datname, s.pid, s.usesysid, u.rolname, s.application_name, s.client_addr, s.client_hostname, s.client_port, s.backend_start, s.xact_start, s.query_start, s.state_change, s.wait_event_type, s.wait_event, s.state, s.backend_xid, s.backend_xmin, s.query, s.backend_type
  • Inner Unique: true
  • Hash Cond: (s.usesysid = u.oid)
  • Buffers: shared hit=2
2. 0.020 0.147 ↑ 12.5 8 1

Hash Left Join (cost=1.05..3.30 rows=100 width=376) (actual time=0.140..0.147 rows=8 loops=1)

  • Output: s.datid, s.pid, s.usesysid, s.application_name, s.client_addr, s.client_hostname, s.client_port, s.backend_start, s.xact_start, s.query_start, s.state_change, s.wait_event_type, s.wait_event, s.state, s.backend_xid, s.backend_xmin, s.query, s.backend_type, d.datname
  • Inner Unique: true
  • Hash Cond: (s.datid = d.oid)
  • Buffers: shared hit=1
3. 0.094 0.094 ↑ 12.5 8 1

Function Scan on pg_catalog.pg_stat_get_activity s (cost=0.00..1.00 rows=100 width=312) (actual time=0.092..0.094 rows=8 loops=1)

  • Output: s.datid, s.pid, s.usesysid, s.application_name, s.state, s.query, s.wait_event_type, s.wait_event, s.xact_start, s.query_start, s.backend_start, s.state_change, s.client_addr, s.client_hostname, s.client_port, s.backend_xid, s.backend_xmin, s.backend_type, s.ssl, s.sslversion, s.sslcipher, s.sslbits, s.sslcompression, s.sslclientdn
  • Function Call: pg_stat_get_activity(NULL::integer)
4. 0.006 0.033 ↓ 2.0 4 1

Hash (cost=1.02..1.02 rows=2 width=68) (actual time=0.033..0.033 rows=4 loops=1)

  • Output: d.datname, d.oid
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
5. 0.027 0.027 ↓ 2.0 4 1

Seq Scan on pg_catalog.pg_database d (cost=0.00..1.02 rows=2 width=68) (actual time=0.026..0.027 rows=4 loops=1)

  • Output: d.datname, d.oid
  • Buffers: shared hit=1
6. 0.005 0.027 ↓ 1.2 7 1

Hash (cost=1.06..1.06 rows=6 width=68) (actual time=0.027..0.027 rows=7 loops=1)

  • Output: u.rolname, u.oid
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
7. 0.022 0.022 ↓ 1.2 7 1

Seq Scan on pg_catalog.pg_authid u (cost=0.00..1.06 rows=6 width=68) (actual time=0.021..0.022 rows=7 loops=1)

  • Output: u.rolname, u.oid
  • Buffers: shared hit=1