explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BZJp

Settings
# exclusive inclusive rows x rows loops node
1. 19.083 97.742 ↑ 1.0 5,637 1

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

  • Functions: 17
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 2.900 ms, Inlining 0.000 ms, Optimization 1.295 ms, Emission 16.704 ms, Total 20.899 ms
2. 4.842 78.659 ↑ 1.0 5,637 1

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

3. 3.235 39.995 ↑ 1.0 5,637 1

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

4. 31.123 31.123 ↑ 1.0 5,637 1

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

  • Filter: (NOT is_deleted)
  • Rows Removed by Filter: 227
5. 5.637 5.637 ↑ 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.001..0.001 rows=1 loops=5,637)

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

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

7. 5.637 11.274 ↑ 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.002 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 : 101.327 ms