explain.depesz.com

PostgreSQL's explain analyze made readable

Result: D57q

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

Unique (cost=5,059.03..5,059.31 rows=7 width=421) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=5,059.03..5,059.04 rows=7 width=421) (actual rows= loops=)

  • Sort Key: disc.program_id, disc.release_id, disc.version_id, disc.sr_database_key3, disc.version_mapping_id, ((SubPlan 1)), ((SubPlan 2)), (concat((SubPlan 3), CASE WHEN (disc.child_titleset_id IS NOT NULL) THEN (': '::text || ((SubPlan 4))::text) ELSE NULL::text END)), disc.release_start_dt, disc.first_aired_date, ((SubPlan 8)), disc.progserv_id, ((SubPlan 9)), (COALESCE((SubPlan 10), '0'::numeric)), ((SubPlan 11))
3. 0.000 0.000 ↓ 0.0

Seq Scan on oad_discrepancies disc (cost=0.00..5,058.93 rows=7 width=421) (actual rows= loops=)

  • Filter: ((progserv_id = (SubPlan 12)) OR (progserv_id = (SubPlan 13)))
4.          

SubPlan (forSeq Scan)

5. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.28..2.31 rows=1 width=38) (actual rows= loops=)

  • Group Key: dis2.version_id
6. 0.000 0.000 ↓ 0.0

Index Scan using oad_discrepancies_version_id_first_aired_date_idx on oad_discrepancies dis2 (cost=0.28..2.29 rows=1 width=13) (actual rows= loops=)

  • Index Cond: (version_id = disc.version_id)
  • Filter: ((local_air_date)::text = (disc.first_aired_date)::text)
7. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.55..4.62 rows=1 width=38) (actual rows= loops=)

  • Group Key: dis3.version_id
8. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=0.55..4.60 rows=1 width=13) (actual rows= loops=)

  • Join Filter: (dis3.version_id = dis4.version_id)
9. 0.000 0.000 ↓ 0.0

Index Scan using oad_discrepancies_version_id_first_aired_date_idx on oad_discrepancies dis3 (cost=0.28..2.29 rows=1 width=13) (actual rows= loops=)

  • Index Cond: ((version_id = disc.version_id) AND (first_aired_date IS NULL))
10. 0.000 0.000 ↓ 0.0

Index Only Scan using oad_discrepancies_version_id_first_aired_date_idx on oad_discrepancies dis4 (cost=0.28..2.29 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((version_id = disc.version_id) AND (first_aired_date IS NOT NULL))
11. 0.000 0.000 ↓ 0.0

Hash Join (cost=2.47..3.79 rows=1 width=12) (actual rows= loops=)

  • Hash Cond: (ps.program_subtype_id = p.program_subtype_id)
12. 0.000 0.000 ↓ 0.0

Seq Scan on program_subtype ps (cost=0.00..1.25 rows=25 width=17) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Hash (cost=2.45..2.45 rows=1 width=5) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Index Scan using "IX_DBO_PROGRAM_1" on program p (cost=0.43..2.45 rows=1 width=5) (actual rows= loops=)

  • Index Cond: (program_id = disc.program_id)
15. 0.000 0.000 ↓ 0.0

Index Scan using "IX_DBO_COUNTRY_NAME_2" on country_name cn (cost=0.14..2.16 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (country_id = disc.country_id)
16. 0.000 0.000 ↓ 0.0

Index Scan using "IX_DBO_TITLESET_1" on titleset t (cost=0.43..2.45 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (titleset_id = disc.titleset_id)
17. 0.000 0.000 ↓ 0.0

Index Scan using "IX_DBO_TITLESET_1" on titleset child (cost=0.43..2.45 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (titleset_id = disc.child_titleset_id)
18. 0.000 0.000 ↓ 0.0

Index Only Scan using "IX_DBO_PROGSERV_2" on progserv p_1 (cost=0.42..19.56 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (progserv_id = disc.progserv_id)
19.          

SubPlan (forIndex Only Scan)

20. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.41..4.51 rows=1 width=5) (actual rows= loops=)

  • Join Filter: (ea.editor_assignment_type_id = eat.editor_assignment_type_id)
21. 0.000 0.000 ↓ 0.0

Seq Scan on editor_assignment_type eat (cost=0.00..1.21 rows=1 width=5) (actual rows= loops=)

  • Filter: ((editor_assignment_type_tag)::text = 'APOLLO COVERAGE EDITOR'::text)
22. 0.000 0.000 ↓ 0.0

Index Scan using "IX_DBO_EDITOR_ASSIGNMENT_4" on editor_assignment ea (cost=0.41..3.27 rows=2 width=10) (actual rows= loops=)

  • Index Cond: (progserv_id = p_1.progserv_id)
23. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.70..6.81 rows=1 width=32) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.41..4.51 rows=1 width=5) (actual rows= loops=)

  • Join Filter: (ea_1.editor_assignment_type_id = eat_1.editor_assignment_type_id)
25. 0.000 0.000 ↓ 0.0

Seq Scan on editor_assignment_type eat_1 (cost=0.00..1.21 rows=1 width=5) (actual rows= loops=)

  • Filter: ((editor_assignment_type_tag)::text = 'APOLLO COVERAGE EDITOR'::text)
26. 0.000 0.000 ↓ 0.0

Index Scan using "IX_DBO_EDITOR_ASSIGNMENT_4" on editor_assignment ea_1 (cost=0.41..3.27 rows=2 width=10) (actual rows= loops=)

  • Index Cond: (progserv_id = p_1.progserv_id)
27. 0.000 0.000 ↓ 0.0

Index Scan using "IX_DBO_EMPLOYEE_2" on employee e (cost=0.28..2.30 rows=1 width=18) (actual rows= loops=)

  • Index Cond: (employee_id = ea_1.employee_id)
28. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.70..6.81 rows=1 width=32) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.41..4.51 rows=1 width=5) (actual rows= loops=)

  • Join Filter: (ea_2.editor_assignment_type_id = eat_2.editor_assignment_type_id)
30. 0.000 0.000 ↓ 0.0

Seq Scan on editor_assignment_type eat_2 (cost=0.00..1.21 rows=1 width=5) (actual rows= loops=)

  • Filter: ((editor_assignment_type_tag)::text = 'APOLLO EDITOR'::text)
31. 0.000 0.000 ↓ 0.0

Index Scan using "IX_DBO_EDITOR_ASSIGNMENT_4" on editor_assignment ea_2 (cost=0.41..3.27 rows=2 width=10) (actual rows= loops=)

  • Index Cond: (progserv_id = p_1.progserv_id)
32. 0.000 0.000 ↓ 0.0

Index Scan using "IX_DBO_EMPLOYEE_2" on employee e_1 (cost=0.28..2.30 rows=1 width=18) (actual rows= loops=)

  • Index Cond: (employee_id = ea_2.employee_id)
33. 0.000 0.000 ↓ 0.0

Index Scan using "IX_DBO_LEGACY_CALL_SIGN_1" on legacy_call_sign cs (cost=0.42..2.44 rows=1 width=7) (actual rows= loops=)

  • Index Cond: (progserv_id = disc.progserv_id)
34. 0.000 0.000 ↓ 0.0

Index Scan using "IX_DBO_RELEASE_PROGSERV_1" on release_progserv rp (cost=0.43..2.45 rows=1 width=6) (actual rows= loops=)

  • Index Cond: (release_id = disc.release_id)
35. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..4.89 rows=1 width=7) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Index Scan using "IX_DBO_RELEASE_PROGSERV_1" on release_progserv rp_1 (cost=0.43..2.45 rows=1 width=6) (actual rows= loops=)

  • Index Cond: (release_id = disc.release_id)
37. 0.000 0.000 ↓ 0.0

Index Scan using "IX_DBO_LEGACY_CALL_SIGN_1" on legacy_call_sign cs2 (cost=0.42..2.44 rows=1 width=13) (actual rows= loops=)

  • Index Cond: (progserv_id = rp_1.progserv_id)