explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TW1J

Settings
# exclusive inclusive rows x rows loops node
1. 19.907 309.608 ↑ 19.4 17,698 1

Unique (cost=796,572.44..798,287.71 rows=343,054 width=4) (actual time=266.351..309.608 rows=17,698 loops=1)

2. 84.268 289.701 ↑ 2.7 125,699 1

Sort (cost=796,572.44..797,430.08 rows=343,054 width=4) (actual time=266.350..289.701 rows=125,699 loops=1)

  • Sort Key: e.user_id
  • Sort Method: external merge Disk: 1736kB
3. 15.870 205.433 ↑ 2.7 125,699 1

Append (cost=8,199.87..760,338.43 rows=343,054 width=4) (actual time=38.385..205.433 rows=125,699 loops=1)

4. 0.000 136.676 ↑ 2.2 102,631 1

Gather (cost=8,199.87..438,243.03 rows=223,152 width=4) (actual time=38.385..136.676 rows=102,631 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 110.108 138.673 ↑ 2.7 34,210 3

Parallel Bitmap Heap Scan on email_history e (cost=7,199.87..414,927.83 rows=92,980 width=4) (actual time=34.234..138.673 rows=34,210 loops=3)

  • Recheck Cond: ((hub_id = 39) AND (email_id = 'HubNowManualMessage'::text))
  • Heap Blocks: exact=7427
6. 28.565 28.565 ↑ 2.2 102,631 1

Bitmap Index Scan on email_history_hub_email_ix (cost=0.00..7,144.08 rows=223,152 width=0) (actual time=28.565..28.565 rows=102,631 loops=1)

  • Index Cond: ((hub_id = 39) AND (email_id = 'HubNowManualMessage'::text))
7. 0.114 0.114 ↓ 0.0 0 1

Index Scan using email_history_hub_email_ix on email_history e_1 (cost=0.56..271.16 rows=71 width=4) (actual time=0.114..0.114 rows=0 loops=1)

  • Index Cond: ((hub_id = 39) AND (email_id = 'HubScheduledManualMessage'::text))
8. 0.000 52.773 ↑ 5.2 23,068 1

Gather (cost=4,864.83..316,678.43 rows=119,831 width=4) (actual time=13.365..52.773 rows=23,068 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
9. 46.159 55.424 ↑ 6.5 7,689 3

Parallel Bitmap Heap Scan on email_history e_2 (cost=3,864.83..303,695.33 rows=49,930 width=4) (actual time=7.508..55.424 rows=7,689 loops=3)

  • Recheck Cond: ((hub_id = 39) AND (email_id = 'HubFutureManualMessage'::text))
  • Heap Blocks: exact=4357
10. 9.265 9.265 ↑ 5.2 23,068 1

Bitmap Index Scan on email_history_hub_email_ix (cost=0.00..3,834.87 rows=119,831 width=0) (actual time=9.265..9.265 rows=23,068 loops=1)

  • Index Cond: ((hub_id = 39) AND (email_id = 'HubFutureManualMessage'::text))