explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mzZl

Settings
# exclusive inclusive rows x rows loops node
1. 0.983 50,666.095 ↑ 194.3 420 1

Sort (cost=1,159,486.79..1,159,690.78 rows=81,596 width=48) (actual time=50,666.066..50,666.095 rows=420 loops=1)

  • Sort Key: (count(*)) DESC
  • Sort Method: quicksort Memory: 57kB
2. 0.703 50,665.112 ↑ 194.3 420 1

Finalize GroupAggregate (cost=1,139,714.82..1,150,317.10 rows=81,596 width=48) (actual time=50,660.491..50,665.112 rows=420 loops=1)

  • Group Key: (date_trunc('day'::text, momessage.kw_split_time)), (((regexp_split_to_array((contact.rawentrylowercase)::text, '@'::text))::character varying[])[2])
  • Filter: (count(*) > 1)
  • Rows Removed by Filter: 1128
3. 0.000 50,664.409 ↑ 35.9 1,893 1

Gather Merge (cost=1,139,714.82..1,148,413.20 rows=67,996 width=48) (actual time=50,660.480..50,664.409 rows=1,893 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 4.029 151,891.401 ↑ 53.9 631 3

Partial GroupAggregate (cost=1,138,714.80..1,139,564.75 rows=33,998 width=48) (actual time=50,628.673..50,630.467 rows=631 loops=3)

  • Group Key: (date_trunc('day'::text, momessage.kw_split_time)), (((regexp_split_to_array((contact.rawentrylowercase)::text, '@'::text))::character varying[])[2])
5. 62.031 151,887.372 ↑ 6.1 5,570 3

Sort (cost=1,138,714.80..1,138,799.79 rows=33,998 width=40) (actual time=50,628.668..50,629.124 rows=5,570 loops=3)

  • Sort Key: (date_trunc('day'::text, momessage.kw_split_time)), (((regexp_split_to_array((contact.rawentrylowercase)::text, '@'::text))::character varying[])[2])
  • Sort Method: quicksort Memory: 609kB
6. 210.164 151,825.341 ↑ 6.1 5,570 3

Nested Loop Left Join (cost=2.56..1,136,155.91 rows=33,998 width=40) (actual time=83.134..50,608.447 rows=5,570 loops=3)

7. 38.786 101,916.663 ↑ 6.1 5,570 3

Nested Loop Left Join (cost=2.13..869,823.45 rows=33,998 width=16) (actual time=72.119..33,972.221 rows=5,570 loops=3)

8. 37.928 99,805.713 ↑ 6.1 5,570 3

Nested Loop Left Join (cost=1.56..598,138.54 rows=33,998 width=16) (actual time=51.088..33,268.571 rows=5,570 loops=3)

9. 38.879 91,078.065 ↑ 6.1 5,570 3

Nested Loop Left Join (cost=1.00..285,457.76 rows=33,998 width=16) (actual time=32.097..30,359.355 rows=5,570 loops=3)

10. 632.676 632.676 ↑ 6.1 5,570 3

Parallel Index Scan using momessage_kw_split_time_idx on momessage (cost=0.44..7,751.45 rows=33,998 width=45) (actual time=21.622..210.892 rows=5,570 loops=3)

  • Index Cond: ((kw_split_time >= '2019-09-01 00:00:00'::timestamp without time zone) AND (kw_split_time < '2019-09-02 00:00:00'::timestamp without time zone))
  • Filter: (synchdispatchsuccess AND ((channel_name)::text = 'EMAIL'::text))
  • Rows Removed by Filter: 62980
11. 90,406.510 90,406.510 ↑ 1.0 1 16,711

Index Scan using index_mmmmessage_messageid on mmmessage (cost=0.56..8.17 rows=1 width=45) (actual time=5.410..5.410 rows=1 loops=16,711)

  • Index Cond: ((momessage.message_id)::text = (messageid)::text)
12. 8,689.720 8,689.720 ↑ 7.0 1 16,711

Index Scan using channeltommmessage_mmmessage_id_idx on channeltommmessage (cost=0.56..9.13 rows=7 width=16) (actual time=0.511..0.520 rows=1 loops=16,711)

  • Index Cond: (mmmessage.id = mmmessage_id)
  • Filter: (active AND (channel_id = 3))
  • Rows Removed by Filter: 0
13. 2,072.164 2,072.164 ↑ 1.0 1 16,711

Index Scan using channel_destinationcontacs_channeltomessage_id_idx on channel_destinationcontacs (cost=0.56..7.98 rows=1 width=16) (actual time=0.124..0.124 rows=1 loops=16,711)

  • Index Cond: (channeltommmessage.id = channeltomessage_id)
14. 49,698.514 49,698.514 ↑ 1.0 1 16,711

Index Scan using contact_pkey on contact (cost=0.43..7.83 rows=1 width=27) (actual time=2.974..2.974 rows=1 loops=16,711)

  • Index Cond: (channel_destinationcontacs.contact_id = id)
Planning time : 24.651 ms
Execution time : 50,671.763 ms