explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bfH9

Settings
# exclusive inclusive rows x rows loops node
1. 1,118.823 3,860.306 ↓ 287.0 287 1

Nested Loop (cost=0.06..15,995.84 rows=1 width=14) (actual time=15.58..3,860.306 rows=287 loops=1)

  • Buffers: shared hit=1,543,737
2. 0.271 22.721 ↓ 282.0 282 1

Nested Loop (cost=0.06..10,273.96 rows=1 width=29) (actual time=1.357..22.721 rows=282 loops=1)

  • Buffers: shared hit=9,939
3. 0.013 0.013 ↑ 1.0 1 1

Index Scan using discounts_pkey on discounts d (cost=0.06..4.06 rows=1 width=22) (actual time=0.01..0.013 rows=1 loops=1)

  • Index Cond: (d.code = 'FOLLOW-UP'::text)
  • Buffers: shared hit=3
4. 22.437 22.437 ↑ 1.0 282 1

Seq Scan on orders o (cost=0..10,268.89 rows=289 width=19) (actual time=1.346..22.437 rows=282 loops=1)

  • Filter: (o.discount_id = 'FOLLOW-UP'::text)
  • Buffers: shared hit=9,936
5. 2,718.762 2,718.762 ↓ 1.0 43,931 282

Seq Scan on payments p (cost=0..5,569.56 rows=43,520 width=7) (actual time=0.002..9.641 rows=43,931 loops=282)

  • Buffers: shared hit=1,533,798
Planning time : 0.3 ms
Execution time : 3,860.432 ms