explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vfMq

Settings
# exclusive inclusive rows x rows loops node
1. 1,242.077 13,966.035 ↓ 82.8 3,312,627 1

GroupAggregate (cost=405,362,136.64..405,377,636.64 rows=40,000 width=26) (actual time=11,176.739..13,966.035 rows=3,312,627 loops=1)

  • Group Key: t1.subject_id_aggr, t1.create_date
  • Buffers: shared hit=6206 read=5590
2. 1,391.690 12,723.958 ↓ 27.8 3,340,816 1

Gather Merge (cost=405,362,136.64..405,376,336.64 rows=120,000 width=26) (actual time=11,176.724..12,723.958 rows=3,340,816 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
  • Buffers: shared hit=24112 read=19941
3. 689.496 11,332.268 ↓ 20.9 835,204 4 / 4

Sort (cost=405,361,136.6..405,361,236.6 rows=40,000 width=26) (actual time=11,136.564..11,332.268 rows=835,204 loops=4)

  • Sort Key: t1.subject_id_aggr, t1.create_date
  • Sort Method: quicksort Memory: 91380kB
  • Buffers: shared hit=24112 read=19941
4. 3,671.767 10,642.772 ↓ 20.9 835,204 4 / 4

HashAggregate (cost=405,357,679.06..405,358,079.06 rows=40,000 width=26) (actual time=10,413.705..10,642.772 rows=835,204 loops=4)

  • Group Key: t1.subject_id_aggr, t1.create_date
  • Buffers: shared hit=24070 read=19941
5. 6,448.919 6,971.005 ↑ 1,913.8 10,772,820 4 / 4

Hash Join (cost=48,003.41..250,732,996.16 rows=20,616,624,387 width=32) (actual time=391.234..6,971.005 rows=10,772,820 loops=4)

  • Buffers: shared hit=24070 read=19941
6. 137.229 137.229 ↑ 1.2 999,250 4 / 4

Seq Scan on pl_subject_email_helper t1 (cost=0..33,550.96 rows=1,156,196 width=22) (actual time=0.016..137.229 rows=999,250 loops=4)

  • Buffers: shared hit=21989
7. 192.753 384.857 ↑ 1.2 999,250 4 / 4

Hash (cost=33,550.96..33,550.96 rows=1,156,196 width=18) (actual time=384.857..384.857 rows=999,250 loops=4)

  • Buffers: shared hit=2048 read=19941
8. 192.104 192.104 ↑ 1.2 999,250 4 / 4

Seq Scan on pl_subject_email_helper t2 (cost=0..33,550.96 rows=1,156,196 width=18) (actual time=0.067..192.104 rows=999,250 loops=4)

  • Buffers: shared hit=2048 read=19941
Planning time : 0.188 ms
Execution time : 17,177.965 ms