explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IvXO

Settings
# exclusive inclusive rows x rows loops node
1. 0.056 643,263.356 ↑ 1.0 500 1

Limit (cost=1,001.49..174,100.09 rows=500 width=754) (actual time=643,132.179..643,263.356 rows=500 loops=1)

2. 46.819 643,263.300 ↑ 139.1 500 1

Gather Merge (cost=1,001.49..24,084,210.13 rows=69,565 width=754) (actual time=643,132.178..643,263.300 rows=500 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
3. 0.066 643,216.481 ↑ 164.1 106 5 / 5

Nested Loop (cost=1.43..24,074,924.21 rows=17,391 width=754) (actual time=642,000.041..643,216.481 rows=106 loops=5)

4. 0.000 643,216.202 ↑ 197.3 106 5 / 5

Nested Loop (cost=1.14..24,068,388.52 rows=20,909 width=754) (actual time=641,984.165..643,216.202 rows=106 loops=5)

5. 76,323.465 76,323.465 ↑ 1.3 17,323,245 5 / 5

Parallel Index Scan using payments_pkey on payments (cost=0.57..5,529,566.77 rows=21,718,402 width=754) (actual time=0.008..76,323.465 rows=17,323,245 loops=5)

6. 571,667.092 571,667.092 ↓ 0.0 0 86,616,226 / 5

Index Scan using charges_pkey on charges (cost=0.57..0.85 rows=1 width=4) (actual time=0.033..0.033 rows=0 loops=86,616,226)

  • Index Cond: (id = payments.charge_id)
  • Filter: (live AND (captured_at >= '2020-09-01 17:00:00'::timestamp without time zone) AND (captured_at <= '2020-09-02 16:59:59.999999'::timestamp without
  • Rows Removed by Filter: 1
7. 0.213 0.213 ↑ 1.0 1 532 / 5

Index Scan using accounts_pkey on accounts (cost=0.29..0.31 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=532)

  • Index Cond: (id = payments.account_id)
  • Filter: (psp_id = 1)
  • Rows Removed by Filter: 0
Planning time : 0.496 ms
Execution time : 643,263.479 ms