explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fJdi

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 1,417.051 ↑ 175.2 550 1

Finalize GroupAggregate (cost=518,119.54..530,098.28 rows=96,360 width=43) (actual time=1,391.990..1,417.051 rows=550 loops=1)

  • Group Key: c3.country_code, (split_part((c2.rawentrylowercase)::text, '@'::text, 2))
2. 102.483 1,418.328 ↑ 73.8 1,088 1

Gather Merge (cost=518,119.54..528,291.53 rows=80,300 width=43) (actual time=1,391.824..1,418.328 rows=1,088 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 14.548 1,315.845 ↑ 110.6 363 3 / 3

Partial GroupAggregate (cost=517,119.51..518,022.89 rows=40,150 width=43) (actual time=1,293.354..1,315.845 rows=363 loops=3)

  • Group Key: c3.country_code, (split_part((c2.rawentrylowercase)::text, '@'::text, 2))
4. 217.415 1,301.297 ↓ 1.5 58,841 3 / 3

Sort (cost=517,119.51..517,219.89 rows=40,150 width=35) (actual time=1,293.171..1,301.297 rows=58,841 loops=3)

  • Sort Key: c3.country_code, (split_part((c2.rawentrylowercase)::text, '@'::text, 2))
  • Sort Method: quicksort Memory: 3,995kB
5. 152.610 1,083.882 ↓ 1.5 58,841 3 / 3

Hash Left Join (cost=14,894.83..514,049.42 rows=40,150 width=35) (actual time=198.764..1,083.882 rows=58,841 loops=3)

  • Hash Cond: (cd.contact_id = c2.id)
6. 55.647 733.458 ↓ 1.5 58,841 3 / 3

Nested Loop Left Join (cost=37.26..496,989.08 rows=40,150 width=11) (actual time=0.622..733.458 rows=58,841 loops=3)

7. 41.822 442.446 ↓ 1.5 58,841 3 / 3

Hash Left Join (cost=36.83..295,599.45 rows=40,150 width=11) (actual time=0.555..442.446 rows=58,841 loops=3)

  • Hash Cond: (mmm.country_id = c3.id)
8. 55.258 400.165 ↓ 1.5 58,841 3 / 3

Nested Loop (cost=0.87..295,457.68 rows=40,150 width=16) (actual time=0.065..400.165 rows=58,841 loops=3)

9. 102.922 102.922 ↓ 1.5 60,496 3 / 3

Parallel Index Scan using mmmessage_creationdate_idx on mmmessage mmm (cost=0.43..10,093.82 rows=41,418 width=16) (actual time=0.013..102.922 rows=60,496 loops=3)

  • Index Cond: (creationdate >= '1592179200000'::bigint)
10. 241.985 241.985 ↑ 4.0 1 181,489 / 3

Index Scan using channeltommmessage_mmmessage_id_idx on channeltommmessage chm (cost=0.43..6.85 rows=4 width=16) (actual time=0.004..0.004 rows=1 loops=181,489)

  • Index Cond: (mmmessage_id = mmm.id)
  • Filter: (channel_id = 3)
  • Rows Removed by Filter: 1
11. 0.245 0.459 ↓ 1.1 1,122 3 / 3

Hash (cost=22.65..22.65 rows=1,065 width=11) (actual time=0.459..0.459 rows=1,122 loops=3)

  • Buckets: 2,048 Batches: 1 Memory Usage: 69kB
12. 0.214 0.214 ↓ 1.1 1,122 3 / 3

Seq Scan on country c3 (cost=0.00..22.65 rows=1,065 width=11) (actual time=0.012..0.214 rows=1,122 loops=3)

13. 235.365 235.365 ↑ 1.0 1 176,524 / 3

Index Scan using channel_destinationcontacs_channeltomessage_id_idx on channel_destinationcontacs cd (cost=0.43..5.01 rows=1 width=16) (actual time=0.004..0.004 rows=1 loops=176,524)

  • Index Cond: (channeltomessage_id = chm.id)
14. 97.364 197.814 ↑ 1.0 178,523 3 / 3

Hash (cost=10,975.92..10,975.92 rows=182,292 width=48) (actual time=197.814..197.814 rows=178,523 loops=3)

  • Buckets: 65,536 Batches: 8 Memory Usage: 2,362kB
15. 100.450 100.450 ↑ 1.0 178,523 3 / 3

Seq Scan on contact c2 (cost=0.00..10,975.92 rows=182,292 width=48) (actual time=0.010..100.450 rows=178,523 loops=3)

Planning time : 0.741 ms
Execution time : 1,419.052 ms