explain.depesz.com

PostgreSQL's explain analyze made readable

Result: peR4

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 0.026 ↑ 1.0 1 1

Nested Loop (cost=1.13..30.27 rows=1 width=645) (actual time=0.024..0.026 rows=1 loops=1)

  • Buffers: shared hit=9
2. 0.001 0.015 ↑ 1.0 1 1

Nested Loop (cost=0.85..24.92 rows=1 width=361) (actual time=0.014..0.015 rows=1 loops=1)

  • Buffers: shared hit=6
3. 0.003 0.011 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.71..16.75 rows=1 width=361) (actual time=0.011..0.011 rows=1 loops=1)

  • Buffers: shared hit=4
4. 0.008 0.008 ↑ 1.0 1 1

Index Scan using pk_employee on employee a (cost=0.42..8.44 rows=1 width=361) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: (id = 1950)
  • Buffers: shared hit=4
5. 0.000 0.000 ↓ 0.0 0 1

Index Scan using pk_user_role on user_role b (cost=0.29..8.30 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: (a.user_role_id = id)
6. 0.003 0.003 ↑ 1.0 1 1

Index Scan using pk_company on company c (cost=0.14..8.16 rows=1 width=8) (actual time=0.002..0.003 rows=1 loops=1)

  • Index Cond: (id = a.company_id)
  • Buffers: shared hit=2
7. 0.003 0.003 ↑ 1.0 1 1

Index Scan using pk_user_role on user_role d (cost=0.29..5.28 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=1)

  • Index Cond: (id = c.user_role_id)
  • Buffers: shared hit=3