explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0BTI4

Settings
# exclusive inclusive rows x rows loops node
1. 0.599 18,549.727 ↑ 1.0 1 1

Aggregate (cost=3,778,534.81..3,778,534.84 rows=1 width=72) (actual time=18,549.727..18,549.727 rows=1 loops=1)

  • Buffers: shared hit=22,337,504 read=4,008 dirtied=17
  • I/O Timings: read=282.663
2. 2.065 18,549.128 ↑ 9.5 735 1

Nested Loop (cost=0.42..3,778,517.28 rows=7,013 width=5) (actual time=2,689.306..18,549.128 rows=735 loops=1)

  • Buffers: shared hit=22,337,495 read=4,008 dirtied=17
  • I/O Timings: read=282.663
3. 185.985 185.985 ↑ 1.1 3,049 1

Seq Scan on required_actions ra (cost=0.00..7,926.97 rows=3,350 width=6) (actual time=6.833..185.985 rows=3,049 loops=1)

  • Filter: ((status)::text = 'TODO'::text)
  • Rows Removed by Filter: 112,447
  • Buffers: shared hit=293 read=3,881 dirtied=17
  • I/O Timings: read=159.752
4. 332.918 18,361.078 ↓ 0.0 0 3,049

Index Scan using idx_rr_ilid on reimb_requests rr (cost=0.42..1,125.43 rows=4 width=5) (actual time=5.956..6.022 rows=0 loops=3,049)

  • Index Cond: ((il_id = ra.il_id) AND (il_id > '5000'::numeric))
  • Filter: (((status)::text = ANY ('{PROCESSED,REFUSED}'::text[])) AND (NOT (SubPlan 1)))
  • Rows Removed by Filter: 45
  • Buffers: shared hit=22,337,202 read=127
  • I/O Timings: read=122.911
5.          

SubPlan (for Index Scan)

6. 18,028.160 18,028.160 ↑ 33.0 1 106,048

Index Scan using idx_rr_ilid on reimb_requests rr2 (cost=0.42..84.09 rows=33 width=5) (actual time=0.170..0.170 rows=1 loops=106,048)

  • Index Cond: (il_id = rr.il_id)
  • Filter: ((status)::text <> ALL ('{PROCESSED,REFUSED}'::text[]))
  • Rows Removed by Filter: 352
  • Buffers: shared hit=22,228,224
Planning time : 2.156 ms
Execution time : 18,549.916 ms