explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GsQh

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 4,015.164 ↓ 326.5 1,306 1

Unique (cost=38,697.40..38,697.56 rows=4 width=524) (actual time=4,014.042..4,015.164 rows=1,306 loops=1)

2. 3.921 4,014.412 ↓ 326.5 1,306 1

Sort (cost=38,697.40..38,697.41 rows=4 width=524) (actual time=4,014.041..4,014.412 rows=1,306 loops=1)

  • 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))
  • Sort Method: quicksort Memory: 392kB
3. 145.197 4,010.491 ↓ 326.5 1,306 1

Seq Scan on oad_discrepancies disc (cost=0.00..38,697.36 rows=4 width=524) (actual time=62.277..4,010.491 rows=1,306 loops=1)

  • Filter: ((progserv_id = (SubPlan 12)) OR (progserv_id = (SubPlan 13)))
  • Rows Removed by Filter: 108
4.          

SubPlan (forSeq Scan)

5. 8.484 527.422 ↑ 1.0 1 1,414

GroupAggregate (cost=0.00..34.67 rows=1 width=50) (actual time=0.372..0.373 rows=1 loops=1,414)

  • Group Key: dis2.version_id
6. 518.938 518.938 ↑ 1.0 1 1,414

Seq Scan on oad_discrepancies dis2 (cost=0.00..34.66 rows=1 width=36) (actual time=0.181..0.367 rows=1 loops=1,414)

  • Filter: ((version_id = disc.version_id) AND ((local_air_date)::text = (disc.first_aired_date)::text))
  • Rows Removed by Filter: 1413
7. 8.700 3,212.736 ↑ 1.0 1 116

GroupAggregate (cost=0.00..67.46 rows=1 width=50) (actual time=27.696..27.696 rows=1 loops=116)

  • Group Key: dis3.version_id
8. 42.256 3,204.036 ↓ 67.0 67 116

Nested Loop Anti Join (cost=0.00..67.44 rows=1 width=36) (actual time=0.419..27.621 rows=67 loops=116)

  • Join Filter: (dis3.version_id = dis4.version_id)
9. 34.220 34.220 ↓ 67.0 67 116

Seq Scan on oad_discrepancies dis3 (cost=0.00..33.71 rows=1 width=36) (actual time=0.015..0.295 rows=67 loops=116)

  • Filter: ((first_aired_date IS NULL) AND (version_id = disc.version_id))
  • Rows Removed by Filter: 1347
10. 3,127.560 3,127.560 ↓ 0.0 0 7,780

Seq Scan on oad_discrepancies dis4 (cost=0.00..33.71 rows=2 width=18) (actual time=0.402..0.402 rows=0 loops=7,780)

  • Filter: ((first_aired_date IS NOT NULL) AND (version_id = disc.version_id))
  • Rows Removed by Filter: 1414
11. 14.366 73.136 ↑ 1.0 1 1,306

Hash Join (cost=2.47..3.79 rows=1 width=12) (actual time=0.051..0.056 rows=1 loops=1,306)

  • Hash Cond: (ps.program_subtype_id = p.program_subtype_id)
12. 5.224 5.224 ↑ 1.0 25 1,306

Seq Scan on program_subtype ps (cost=0.00..1.25 rows=25 width=17) (actual time=0.002..0.004 rows=25 loops=1,306)

13. 3.918 53.546 ↑ 1.0 1 1,306

Hash (cost=2.45..2.45 rows=1 width=5) (actual time=0.041..0.041 rows=1 loops=1,306)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 49.628 49.628 ↑ 1.0 1 1,306

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

  • Index Cond: (program_id = disc.program_id)
15. 5.224 5.224 ↑ 1.0 1 1,306

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

  • Index Cond: (country_id = disc.country_id)
16. 45.710 45.710 ↑ 1.0 1 1,306

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

  • Index Cond: (titleset_id = disc.titleset_id)
17. 1.066 1.066 ↑ 1.0 1 41

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

  • Index Cond: (titleset_id = disc.child_titleset_id)
18. 0.000 79.666 ↑ 1.0 1 1,306

Index Only Scan using ""IX_DBO_PROGSERV_2"" on progserv p_1 (cost=0.42..19.60 rows=1 width=32) (actual time=0.060..0.061 rows=1 loops=1,306)

  • Index Cond: (progserv_id = disc.progserv_id)
  • Heap Fetches: 1
19.          

SubPlan (forIndex Only Scan)

20. 2.612 27.426 ↓ 0.0 0 1,306

Nested Loop (cost=0.41..4.52 rows=1 width=5) (actual time=0.021..0.021 rows=0 loops=1,306)

  • Join Filter: (ea.editor_assignment_type_id = eat.editor_assignment_type_id)
  • Rows Removed by Join Filter: 2
21. 5.224 5.224 ↑ 1.0 1 1,306

Seq Scan on editor_assignment_type eat (cost=0.00..1.21 rows=1 width=5) (actual time=0.003..0.004 rows=1 loops=1,306)

  • Filter: ((editor_assignment_type_tag)::text = 'APOLLO COVERAGE EDITOR'::text)
  • Rows Removed by Filter: 16
22. 19.590 19.590 ↑ 1.0 2 1,306

Index Scan using ""IX_DBO_EDITOR_ASSIGNMENT_4"" on editor_assignment ea (cost=0.41..3.28 rows=2 width=10) (actual time=0.013..0.015 rows=2 loops=1,306)

  • Index Cond: (progserv_id = p_1.progserv_id)
23. 0.756 1.998 ↑ 1.0 1 54

Nested Loop (cost=0.70..6.82 rows=1 width=32) (actual time=0.035..0.037 rows=1 loops=54)

24. 0.216 0.810 ↑ 1.0 1 54

Nested Loop (cost=0.41..4.52 rows=1 width=5) (actual time=0.014..0.015 rows=1 loops=54)

  • Join Filter: (ea_1.editor_assignment_type_id = eat_1.editor_assignment_type_id)
25. 0.270 0.270 ↑ 1.0 1 54

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

  • Filter: ((editor_assignment_type_tag)::text = 'APOLLO COVERAGE EDITOR'::text)
  • Rows Removed by Filter: 16
26. 0.324 0.324 ↑ 2.0 1 54

Index Scan using ""IX_DBO_EDITOR_ASSIGNMENT_4"" on editor_assignment ea_1 (cost=0.41..3.28 rows=2 width=10) (actual time=0.006..0.006 rows=1 loops=54)

  • Index Cond: (progserv_id = p_1.progserv_id)
27. 0.432 0.432 ↑ 1.0 1 54

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

  • Index Cond: (employee_id = ea_1.employee_id)
28. 8.670 26.292 ↑ 1.0 1 1,252

Nested Loop (cost=0.70..6.82 rows=1 width=32) (actual time=0.020..0.021 rows=1 loops=1,252)

29. 1.252 11.268 ↑ 1.0 1 1,252

Nested Loop (cost=0.41..4.52 rows=1 width=5) (actual time=0.008..0.009 rows=1 loops=1,252)

  • Join Filter: (ea_2.editor_assignment_type_id = eat_2.editor_assignment_type_id)
  • Rows Removed by Join Filter: 0
30. 5.008 5.008 ↑ 1.0 1 1,252

Seq Scan on editor_assignment_type eat_2 (cost=0.00..1.21 rows=1 width=5) (actual time=0.002..0.004 rows=1 loops=1,252)

  • Filter: ((editor_assignment_type_tag)::text = 'APOLLO EDITOR'::text)
  • Rows Removed by Filter: 16
31. 5.008 5.008 ↑ 2.0 1 1,252

Index Scan using ""IX_DBO_EDITOR_ASSIGNMENT_4"" on editor_assignment ea_2 (cost=0.41..3.28 rows=2 width=10) (actual time=0.004..0.004 rows=1 loops=1,252)

  • Index Cond: (progserv_id = p_1.progserv_id)
32. 6.354 6.354 ↑ 1.0 1 1,059

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

  • Index Cond: (employee_id = ea_2.employee_id)
33. 18.284 18.284 ↑ 1.0 1 1,306

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

  • Index Cond: (progserv_id = disc.progserv_id)
34. 7.836 7.836 ↓ 0.0 0 1,306

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

  • Index Cond: (release_id = disc.release_id)
35. 1.768 5.224 ↓ 0.0 0 1,306

Nested Loop (cost=0.85..4.89 rows=1 width=7) (actual time=0.004..0.004 rows=0 loops=1,306)

36. 1.306 1.306 ↓ 0.0 0 1,306

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

  • Index Cond: (release_id = disc.release_id)
37. 2.150 2.150 ↑ 1.0 1 215

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

  • Index Cond: (progserv_id = rp_1.progserv_id)",,,,,,,,,"