explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DQ4N

Settings
# exclusive inclusive rows x rows loops node
1. 0.064 302,495.222 ↑ 1.0 1 1

Aggregate (cost=554,239.21..554,239.22 rows=1 width=8) (actual time=302,495.222..302,495.222 rows=1 loops=1)

2. 0.078 302,495.158 ↑ 10,571.0 70 1

Merge Join (cost=541,167.96..552,389.27 rows=739,973 width=16) (actual time=302,494.424..302,495.158 rows=70 loops=1)

  • Merge Cond: (m.event_uuid = ns.event_uuid)
3. 0.474 48.653 ↑ 12.8 527 1

Merge Join (cost=3,233.35..3,338.02 rows=6,764 width=32) (actual time=47.885..48.653 rows=527 loops=1)

  • Merge Cond: (m.event_uuid = e.event_uuid)
4. 0.394 6.711 ↑ 1.2 527 1

Sort (cost=1,361.39..1,362.99 rows=643 width=16) (actual time=6.630..6.711 rows=527 loops=1)

  • Sort Key: m.event_uuid
  • Sort Method: quicksort Memory: 50kB
5. 6.317 6.317 ↑ 1.2 537 1

Index Scan using messages_org_part_25_event_created_idx on messages_org_part_25 m (cost=0.42..1,331.39 rows=643 width=16) (actual time=0.095..6.317 rows=537 loops=1)

  • Index Cond: ((event_created >= '2019-10-01 00:00:00-07'::timestamp with time zone) AND (event_created <= '2019-10-02 00:00:00-07'::timestamp with time zone))
  • Filter: (((subject)::text ~~ '%ACT%'::text) AND (organization_uuid = 'd528beb8-98bf-4d4a-b93a-5333bc759185'::uuid))
  • Rows Removed by Filter: 1086
6. 23.373 41.468 ↑ 1.3 1,590 1

Sort (cost=1,871.96..1,877.22 rows=2,104 width=16) (actual time=41.213..41.468 rows=1,590 loops=1)

  • Sort Key: e.event_uuid
  • Sort Method: quicksort Memory: 125kB
7. 18.095 18.095 ↑ 1.3 1,623 1

Index Scan using events_org_part_25_created_idx on events_org_part_25 e (cost=0.42..1,755.83 rows=2,104 width=16) (actual time=0.089..18.095 rows=1,623 loops=1)

  • Index Cond: ((created >= '2019-10-01 00:00:00-07'::timestamp with time zone) AND (created <= '2019-10-02 00:00:00-07'::timestamp with time zone))
  • Filter: ((organization_uuid = 'd528beb8-98bf-4d4a-b93a-5333bc759185'::uuid) AND ((status)::text = 'ACTIVE'::text))
  • Rows Removed by Filter: 1623
8. 0.243 302,446.427 ↑ 312.6 70 1

Sort (cost=537,934.61..537,989.31 rows=21,880 width=16) (actual time=302,446.421..302,446.427 rows=70 loops=1)

  • Sort Key: ns.event_uuid
  • Sort Method: quicksort Memory: 28kB
9. 1.632 302,446.184 ↑ 312.6 70 1

Nested Loop (cost=1.11..536,357.36 rows=21,880 width=16) (actual time=33,509.582..302,446.184 rows=70 loops=1)

10. 10.104 10.104 ↓ 173.0 173 1

Index Scan using groups_org_part_default_pkey on groups_org_part_default gr (cost=0.55..226.17 rows=1 width=16) (actual time=0.196..10.104 rows=173 loops=1)

  • Index Cond: (organization_uuid = 'd528beb8-98bf-4d4a-b93a-5333bc759185'::uuid)
  • Filter: ((target_name)::text ~~ '%OnCall%'::text)
  • Rows Removed by Filter: 530
11. 302,434.448 302,434.448 ↓ 0.0 0 173

Index Scan using notifications_summary_weekly_organization_uuid_recipient__idx35 on notifications_summary_weekly_partitioned_2019_w40 ns (cost=0.56..536,130.45 rows=74 width=32) (actual time=1,703.150..1,748.176 rows=0 loops=173)

  • Index Cond: ((recipient_uuid = gr.group_uuid) AND (created_date >= '2019-10-01 00:00:00-07'::timestamp with time zone) AND (created_date <= '2019-10-02 00:00:00-07'::timestamp with time zone))
Planning time : 2.187 ms
Execution time : 302,495.821 ms