explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yMKk

Settings
# exclusive inclusive rows x rows loops node
1. 0.076 45.719 ↑ 854.0 1 1

Hash Left Join (cost=1,056.87..11,555.16 rows=854 width=645) (actual time=30.683..45.719 rows=1 loops=1)

  • Hash Cond: (a.user_role_id = b.id)
  • Buffers: shared hit=15402
2. 0.016 41.436 ↑ 854.0 1 1

Hash Join (cost=483.31..10,930.81 rows=854 width=361) (actual time=26.401..41.436 rows=1 loops=1)

  • Hash Cond: (a.company_id = c.id)
  • Buffers: shared hit=15152
3. 38.738 38.738 ↑ 854.0 1 1

Seq Scan on employee a (cost=0.00..10,435.76 rows=854 width=361) (actual time=23.703..38.738 rows=1 loops=1)

  • Filter: ((id)::text = '1950'::text)
  • Rows Removed by Filter: 170786
  • Buffers: shared hit=14871
4. 0.019 2.682 ↓ 1.1 109 1

Hash (cost=482.04..482.04 rows=102 width=8) (actual time=2.682..2.682 rows=109 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
  • Buffers: shared hit=281
5. 1.336 2.663 ↓ 1.1 109 1

Hash Join (cost=33.30..482.04 rows=102 width=8) (actual time=0.132..2.663 rows=109 loops=1)

  • Hash Cond: (d.id = c.user_role_id)
  • Buffers: shared hit=281
6. 1.253 1.253 ↓ 1.0 14,526 1

Seq Scan on user_role d (cost=0.00..393.80 rows=14,380 width=8) (actual time=0.003..1.253 rows=14,526 loops=1)

  • Buffers: shared hit=250
7. 0.019 0.074 ↓ 1.1 109 1

Hash (cost=32.02..32.02 rows=102 width=8) (actual time=0.074..0.074 rows=109 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
  • Buffers: shared hit=31
8. 0.055 0.055 ↓ 1.1 109 1

Seq Scan on company c (cost=0.00..32.02 rows=102 width=8) (actual time=0.002..0.055 rows=109 loops=1)

  • Buffers: shared hit=31
9. 2.347 4.207 ↓ 1.0 14,526 1

Hash (cost=393.80..393.80 rows=14,380 width=8) (actual time=4.207..4.207 rows=14,526 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 696kB
  • Buffers: shared hit=250
10. 1.860 1.860 ↓ 1.0 14,526 1

Seq Scan on user_role b (cost=0.00..393.80 rows=14,380 width=8) (actual time=0.002..1.860 rows=14,526 loops=1)

  • Buffers: shared hit=250