explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ap2n

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Hash Anti Join (cost=47,644,008.84..721,264,171,115,342.12 rows=130,702,856 width=86) (actual rows= loops=)

  • Hash Cond: ((shift_members_org_part_1_l2_f.shift_uuid = grp_tf.uuid) AND (shift_members_org_part_1_l2_f.recipient_uuid = (recipients.uuid)::uuid))
2. 0.000 0.000 ↓ 0.0

Append (cost=47,643,835.67..721,264,169,089,242.00 rows=130,706,124 width=86) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Index Scan using shift_members_org_part_1_l2_f_shift_recipient_uuid_dx on shift_members_org_part_1_l2_f (cost=47,643,835.67..716,578,997,176,010.25 rows=129,857,095 width=86) (actual rows= loops=)

  • Filter: ((organization_uuid = 'f3185a16-1604-4839-ba8b-c251a95023d2'::uuid) AND (upper_inf(valid_range) OR (SubPlan 1)))
4.          

SubPlan (for Index Scan)

5. 0.000 0.000 ↓ 0.0

Materialize (cost=47,643,835.10..55,000,361.23 rows=435,687 width=16) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Subquery Scan on t (cost=47,643,835.10..54,996,054.80 rows=435,687 width=16) (actual rows= loops=)

  • Filter: ((NOT upper_inf(t.valid_range)) AND (NOT upper_inc(t.valid_range)) AND (t.rn = 1))
7. 0.000 0.000 ↓ 0.0

WindowAgg (cost=47,643,835.10..51,565,018.94 rows=196,059,192 width=200) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Sort (cost=47,643,835.10..48,133,983.08 rows=196,059,192 width=54) (actual rows= loops=)

  • Sort Key: t_1.shift_uuid, t_1.valid_range DESC
9. 0.000 0.000 ↓ 0.0

Append (cost=0.00..7,716,075.86 rows=196,059,192 width=54) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on shift_members_org_part_1_l2_f t_1 (cost=0.00..6,645,828.60 rows=194,785,648 width=54) (actual rows= loops=)

  • Filter: (organization_uuid = 'f3185a16-1604-4839-ba8b-c251a95023d2'::uuid)
11. 0.000 0.000 ↓ 0.0

Seq Scan on shift_members_org_part_1_l2_t t_2 (cost=0.00..89,951.30 rows=1,273,544 width=54) (actual rows= loops=)

  • Filter: (organization_uuid = 'f3185a16-1604-4839-ba8b-c251a95023d2'::uuid)
12. 0.000 0.000 ↓ 0.0

Index Scan using shift_members_org_part_1_l2_t_shift_recipient_uuid_dx on shift_members_org_part_1_l2_t (cost=47,643,835.52..4,685,171,259,701.16 rows=849,029 width=78) (actual rows= loops=)

  • Filter: ((organization_uuid = 'f3185a16-1604-4839-ba8b-c251a95023d2'::uuid) AND (upper_inf(valid_range) OR (SubPlan 1)))
13. 0.000 0.000 ↓ 0.0

Hash (cost=173.15..173.15 rows=1 width=106) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Nested Loop (cost=100.41..173.15 rows=1 width=106) (actual rows= loops=)

  • Join Filter: (tm_mbrships.when_updated < ct.commit_timestamp)
15. 0.000 0.000 ↓ 0.0

Foreign Scan (cost=100.00..169.72 rows=1 width=130) (actual rows= loops=)

  • Relations: ((ge.tm_mbrships) INNER JOIN (ge.grp_tf)) INNER JOIN (ge.recipients)
16. 0.000 0.000 ↓ 0.0

Index Scan using completed_transactions_organization_uuid_pk on completed_transactions ct (cost=0.41..3.42 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (organization_uuid = 'f3185a16-1604-4839-ba8b-c251a95023d2'::uuid)