explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RcBN

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.022 ↓ 0.0 0 1

Update on eligible_customer ecouter (cost=397.20..438.05 rows=9 width=129) (actual time=0.022..0.022 rows=0 loops=1)

  • Update on eligible_customer_partition_99799 ecouter_1
2. 0.000 0.021 ↓ 0.0 0 1

Nested Loop (cost=397.20..438.05 rows=9 width=129) (actual time=0.021..0.021 rows=0 loops=1)

3. 0.001 0.021 ↓ 0.0 0 1

Hash Join (cost=396.92..432.45 rows=9 width=54) (actual time=0.021..0.021 rows=0 loops=1)

  • Hash Cond: (ed.customer_internal_id = tempdata.customer_internal_id)
4. 0.020 0.020 ↓ 0.0 0 1

Seq Scan on entity_details ed (cost=0.00..28.50 rows=1,850 width=22) (actual time=0.020..0.020 rows=0 loops=1)

5. 0.000 0.000 ↓ 0.0 0

Hash (cost=396.91..396.91 rows=1 width=48) (never executed)

6. 0.000 0.000 ↓ 0.0 0

Subquery Scan on tempdata (cost=396.88..396.91 rows=1 width=48) (never executed)

7. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=396.88..396.90 rows=1 width=20) (never executed)

  • Group Key: ec.customer_internal_id, ec.team_internal_id
8. 0.000 0.000 ↓ 0.0 0

Sort (cost=396.88..396.88 rows=1 width=20) (never executed)

  • Sort Key: ec.customer_internal_id
9. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=361.34..396.87 rows=1 width=20) (never executed)

  • Hash Cond: (ed_1.customer_internal_id = ec.customer_internal_id)
10. 0.000 0.000 ↓ 0.0 0

Seq Scan on entity_details ed_1 (cost=0.00..28.50 rows=1,850 width=8) (never executed)

11. 0.000 0.000 ↓ 0.0 0

Hash (cost=361.32..361.32 rows=1 width=20) (never executed)

12. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=180.45..361.32 rows=1 width=20) (never executed)

  • Join Filter: ((cao.from_id = ec.eligibility_id) AND (cao.data_version_id = dvs.data_version_id))
  • Filter: (cao.id IS NULL)
13. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=180.45..347.82 rows=1 width=36) (never executed)

  • Join Filter: (ec.data_version_id = dvs.data_version_id)
14. 0.000 0.000 ↓ 0.0 0

Append (cost=0.00..163.08 rows=1 width=36) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Seq Scan on eligible_customer_partition_99799 ec (cost=0.00..163.07 rows=1 width=36) (never executed)

  • Filter: ((superseded IS NULL) AND (start_date > '2020-01-01'::date) AND (team_internal_id = 99,799))
16. 0.000 0.000 ↓ 0.0 0

CTE Scan on data_versions dvs (cost=180.45..182.47 rows=101 width=8) (never executed)

17.          

CTE data_versions

18. 0.000 0.000 ↓ 0.0 0

Recursive Union (cost=0.16..180.45 rows=101 width=16) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Index Scan using data_version_pkey on data_version dv (cost=0.16..8.18 rows=1 width=16) (never executed)

  • Index Cond: (data_version_id = $664)
20.          

Initplan (for Index Scan)

21. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.02 rows=1 width=8) (never executed)

22. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=0.33..17.03 rows=10 width=16) (never executed)

  • Hash Cond: (dv_1.data_version_id = dvs_1.parent_data_version_id)
23. 0.000 0.000 ↓ 0.0 0

Seq Scan on data_version dv_1 (cost=0.00..14.80 rows=480 width=16) (never executed)

24. 0.000 0.000 ↓ 0.0 0

Hash (cost=0.20..0.20 rows=10 width=8) (never executed)

25. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on data_versions dvs_1 (cost=0.00..0.20 rows=10 width=8) (never executed)

26. 0.000 0.000 ↓ 0.0 0

Seq Scan on customer_alignment_overridden cao (cost=0.00..11.40 rows=140 width=24) (never executed)

27. 0.000 0.000 ↓ 0.0 0

Index Scan using eligible_customer_partition_99799_pkey on eligible_customer_partition_99799 ecouter_1 (cost=0.28..0.62 rows=1 width=83) (never executed)

  • Index Cond: ((eligibility_id = ed.new_eligibility_id) AND (team_internal_id = 99,799))