explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BHa5

Settings
# exclusive inclusive rows x rows loops node
1. 19.520 131.315 ↑ 1.0 5,637 1

Limit (cost=20.46..119,336.46 rows=5,637 width=212) (actual time=18.793..131.315 rows=5,637 loops=1)

  • Functions: 17
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 3.099 ms, Inlining 0.000 ms, Optimization 1.177 ms, Emission 17.033 ms, Total 21.309 ms
2. 5.676 111.795 ↑ 1.0 5,637 1

Nested Loop Left Join (cost=20.46..119,336.46 rows=5,637 width=212) (actual time=0.145..111.795 rows=5,637 loops=1)

3. 1.796 55.386 ↑ 1.0 5,637 1

Nested Loop (cost=0.15..4,679.09 rows=5,637 width=202) (actual time=0.084..55.386 rows=5,637 loops=1)

4. 42.316 42.316 ↑ 1.0 5,637 1

Seq Scan on stocks s (cost=0.00..3,687.10 rows=5,637 width=134) (actual time=0.058..42.316 rows=5,637 loops=1)

  • Filter: (NOT is_deleted)
  • Rows Removed by Filter: 227
5. 11.274 11.274 ↑ 1.0 1 5,637

Index Scan using steps_actions_pkey on steps_actions sa (cost=0.15..0.18 rows=1 width=76) (actual time=0.002..0.002 rows=1 loops=5,637)

  • Index Cond: (id = s.step_action_id)
6. 33.822 50.733 ↑ 1.0 1 5,637

Aggregate (cost=20.31..20.32 rows=1 width=32) (actual time=0.009..0.009 rows=1 loops=5,637)

7. 11.274 16.911 ↑ 10.0 1 5,637

Bitmap Heap Scan on ref_stock_statuses status (cost=9.60..20.26 rows=10 width=40) (actual time=0.002..0.003 rows=1 loops=5,637)

  • Recheck Cond: (id = ANY (s.statuses))
  • Heap Blocks: exact=3,964
8. 5.637 5.637 ↑ 10.0 1 5,637

Bitmap Index Scan on ref_stock_statuses_pkey (cost=0.00..9.60 rows=10 width=0) (actual time=0.001..0.001 rows=1 loops=5,637)

  • Index Cond: (id = ANY (s.statuses))
Execution time : 135.270 ms