explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FP0W

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 13,699.878 ↑ 1.0 1 1

Finalize Aggregate (cost=1,571,714.33..1,571,714.34 rows=1 width=8) (actual time=13,699.877..13,699.878 rows=1 loops=1)

2. 99.311 13,700.806 ↓ 1.5 3 1

Gather (cost=1,571,714.11..1,571,714.32 rows=2 width=8) (actual time=13,564.689..13,700.806 rows=3 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 7.574 13,601.495 ↑ 1.0 1 3 / 3

Partial Aggregate (cost=1,570,714.11..1,570,714.12 rows=1 width=8) (actual time=13,601.494..13,601.495 rows=1 loops=3)

4. 0.000 13,593.921 ↓ 3.6 98,789 3 / 3

Nested Loop (cost=1,454,861.01..1,570,645.55 rows=27,426 width=4) (actual time=12,879.704..13,593.921 rows=98,789 loops=3)

  • Join Filter: (scheduling_attempt.recipient_id = scheduling_recipient.id)
5. 948.078 13,399.386 ↓ 2.8 98,789 3 / 3

Merge Join (cost=1,454,860.44..1,469,650.67 rows=35,378 width=12) (actual time=12,879.662..13,399.386 rows=98,789 loops=3)

  • Merge Cond: (xact_message.recipient_id = scheduling_attempt.recipient_id)
6. 6,132.838 11,278.328 ↓ 6.2 8,926,567 3 / 3

Sort (cost=1,226,682.15..1,230,283.84 rows=1,440,678 width=4) (actual time=10,054.708..11,278.328 rows=8,926,567 loops=3)

  • Sort Key: xact_message.recipient_id
  • Sort Method: external merge Disk: 129,824kB
7. 3,187.254 5,145.490 ↓ 6.7 9,663,818 3 / 3

Hash Join (cost=3.46..1,059,614.92 rows=1,440,678 width=4) (actual time=0.078..5,145.490 rows=9,663,818 loops=3)

  • Hash Cond: (xact_message.templatelanguage_id = xact_templatelanguage.id)
8. 1,958.210 1,958.210 ↑ 1.2 13,832,086 3 / 3

Parallel Seq Scan on xact_message (cost=0.00..1,012,449.28 rows=17,288,128 width=8) (actual time=0.016..1,958.210 rows=13,832,086 loops=3)

9. 0.005 0.026 ↑ 1.0 9 3 / 3

Hash (cost=3.35..3.35 rows=9 width=4) (actual time=0.026..0.026 rows=9 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
10. 0.021 0.021 ↑ 1.0 9 3 / 3

Seq Scan on xact_templatelanguage (cost=0.00..3.35 rows=9 width=4) (actual time=0.009..0.021 rows=9 loops=3)

  • Filter: (template_id = 3)
  • Rows Removed by Filter: 99
11. 138.116 1,172.980 ↑ 1.0 1,010,118 3 / 3

Materialize (cost=228,177.95..233,272.43 rows=1,018,896 width=8) (actual time=842.701..1,172.980 rows=1,010,118 loops=3)

12. 589.021 1,034.864 ↑ 1.0 1,010,118 3 / 3

Sort (cost=228,177.95..230,725.19 rows=1,018,896 width=8) (actual time=842.697..1,034.864 rows=1,010,118 loops=3)

  • Sort Key: scheduling_attempt.recipient_id
  • Sort Method: external merge Disk: 17,880kB
13. 445.843 445.843 ↑ 1.0 1,010,118 3 / 3

Index Scan using scheduling__executi_8d7109_idx on scheduling_attempt (cost=0.57..112,565.89 rows=1,018,896 width=8) (actual time=0.026..445.843 rows=1,010,118 loops=3)

  • Index Cond: (execution_time >= '2020-06-22 10:12:40.266861+00'::timestamp with time zone)
14. 197.577 197.577 ↑ 1.0 1 296,366 / 3

Index Only Scan using scheduling_recipient_pkey on scheduling_recipient (cost=0.56..2.84 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=296,366)

  • Index Cond: (id = xact_message.recipient_id)
  • Heap Fetches: 95,958