explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3Uel

Settings
# exclusive inclusive rows x rows loops node
1. 864.516 17,011.148 ↓ 1.0 200,595 1

Nested Loop Left Join (cost=16,164.97..135,741,626.07 rows=200,539 width=1,250) (actual time=131.791..17,011.148 rows=200,595 loops=1)

2. 221.623 1,865.190 ↓ 1.0 200,595 1

Nested Loop Left Join (cost=16,153.46..7,674,225.36 rows=200,539 width=1,595) (actual time=94.260..1,865.190 rows=200,595 loops=1)

3. 56.977 1,442.972 ↓ 1.0 200,595 1

Hash Left Join (cost=16,153.03..6,998,305.48 rows=200,539 width=1,501) (actual time=94.248..1,442.972 rows=200,595 loops=1)

  • Hash Cond: (approverassigned.territory_id = internationalapproverterritory.id)
4. 61.880 1,385.954 ↓ 1.0 200,595 1

Hash Left Join (cost=16,146.53..6,997,761.40 rows=200,539 width=1,501) (actual time=94.198..1,385.954 rows=200,595 loops=1)

  • Hash Cond: (r.approver_fee_id = prf.id)
5. 197.099 1,323.967 ↓ 1.0 200,595 1

Hash Left Join (cost=16,137.19..6,996,999.63 rows=200,539 width=1,475) (actual time=94.077..1,323.967 rows=200,595 loops=1)

  • Hash Cond: (r.project_id = pir.project_id)
  • Join Filter: (NOT (SubPlan 22))
  • Rows Removed by Join Filter: 203,285
6. 48.457 247.151 ↓ 1.0 200,595 1

Hash Left Join (cost=5,773.76..379,581.42 rows=200,539 width=1,435) (actual time=21.569..247.151 rows=200,595 loops=1)

  • Hash Cond: (r.id = rsi.request_id)
  • Join Filter: (NOT (SubPlan 21))
  • Rows Removed by Join Filter: 550
7. 0.000 195.058 ↓ 1.0 200,595 1

Gather (cost=5,737.23..354,483.73 rows=200,539 width=1,425) (actual time=21.265..195.058 rows=200,595 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 30.013 265.523 ↑ 1.2 66,865 3 / 3

Nested Loop Left Join (cost=4,737.23..333,429.83 rows=83,558 width=1,425) (actual time=50.327..265.523 rows=66,865 loops=3)

9. 15.804 235.510 ↑ 1.2 66,865 3 / 3

Hash Left Join (cost=4,736.80..41,738.97 rows=83,558 width=780) (actual time=50.317..235.510 rows=66,865 loops=3)

  • Hash Cond: (p.licensee_contact_id = contactlicensee.id)
10. 16.573 215.319 ↑ 1.2 66,865 3 / 3

Hash Left Join (cost=4,257.42..41,040.25 rows=83,558 width=778) (actual time=45.858..215.319 rows=66,865 loops=3)

  • Hash Cond: (p.license_manager_user_id = userlicensemanager.id)
11. 15.971 197.876 ↑ 1.2 66,865 3 / 3

Hash Left Join (cost=4,174.59..40,738.08 rows=83,558 width=773) (actual time=44.968..197.876 rows=66,865 loops=3)

  • Hash Cond: (p.sync_client_contact_id = contactsyncclient.id)
12. 17.075 176.654 ↑ 1.2 66,865 3 / 3

Hash Left Join (cost=3,695.22..40,039.36 rows=83,558 width=748) (actual time=39.646..176.654 rows=66,865 loops=3)

  • Hash Cond: (r.intl_approver_user_id = internationalapprover.id)
13. 16.100 158.112 ↑ 1.2 66,865 3 / 3

Hash Left Join (cost=3,604.71..39,635.21 rows=83,558 width=735) (actual time=38.166..158.112 rows=66,865 loops=3)

  • Hash Cond: (r.currency_territory_id = currencyterritory.id)
14. 15.429 141.857 ↑ 1.2 66,865 3 / 3

Hash Left Join (cost=3,596.04..39,313.16 rows=83,558 width=727) (actual time=37.999..141.857 rows=66,865 loops=3)

  • Hash Cond: (r.sync_author_user_id = userauthor.id)
15. 31.197 124.371 ↑ 1.2 66,865 3 / 3

Merge Join (cost=3,493.81..38,897.58 rows=83,558 width=714) (actual time=35.878..124.371 rows=66,865 loops=3)

  • Merge Cond: (r.project_id = p.id)
16. 35.190 74.161 ↑ 1.2 66,865 3 / 3

Merge Join (cost=1,331.25..23,890.03 rows=83,575 width=668) (actual time=17.488..74.161 rows=66,865 loops=3)

  • Merge Cond: (r.project_id = playlist.project_id)
17. 21.362 21.362 ↑ 1.2 66,865 3 / 3

Parallel Index Scan using request_project_index on project_request r (cost=0.42..14,202.25 rows=83,575 width=640) (actual time=0.015..21.362 rows=66,865 loops=3)

18. 17.609 17.609 ↑ 1.7 101,103 3 / 3

Index Scan using project_playlist_project_id_index on project_playlist playlist (cost=0.42..8,236.80 rows=167,896 width=28) (actual time=0.013..17.609 rows=101,103 loops=3)

19. 19.013 19.013 ↑ 1.7 101,103 3 / 3

Index Scan using project_pkey on project p (cost=0.42..13,609.78 rows=167,931 width=62) (actual time=0.018..19.013 rows=101,103 loops=3)

20. 0.528 2.057 ↑ 1.0 1,948 3 / 3

Hash (cost=77.88..77.88 rows=1,948 width=29) (actual time=2.057..2.057 rows=1,948 loops=3)

  • Buckets: 2,048 Batches: 1 Memory Usage: 141kB
21. 0.485 1.529 ↑ 1.0 1,948 3 / 3

Hash Left Join (cost=8.67..77.88 rows=1,948 width=29) (actual time=0.124..1.529 rows=1,948 loops=3)

  • Hash Cond: (assigned.territory_id = userauthorterritory.id)
22. 0.693 0.970 ↑ 1.0 1,948 3 / 3

Hash Left Join (cost=2.17..66.15 rows=1,948 width=29) (actual time=0.039..0.970 rows=1,948 loops=3)

  • Hash Cond: (userauthor.default_territory_id = assigned.id)
23. 0.258 0.258 ↑ 1.0 1,948 3 / 3

Seq Scan on ""user"" userauthor (cost=0.00..58.48 rows=1,948 width=29) (actual time=0.009..0.258 rows=1,948 loops=3)

24. 0.010 0.019 ↑ 1.0 52 3 / 3

Hash (cost=1.52..1.52 rows=52 width=16) (actual time=0.019..0.019 rows=52 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
25. 0.009 0.009 ↑ 1.0 52 3 / 3

Seq Scan on user_assigned_territory assigned (cost=0.00..1.52 rows=52 width=16) (actual time=0.005..0.009 rows=52 loops=3)

26. 0.041 0.074 ↑ 1.0 200 3 / 3

Hash (cost=4.00..4.00 rows=200 width=8) (actual time=0.074..0.074 rows=200 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 16kB
27. 0.033 0.033 ↑ 1.0 200 3 / 3

Seq Scan on territory userauthorterritory (cost=0.00..4.00 rows=200 width=8) (actual time=0.007..0.033 rows=200 loops=3)

28. 0.043 0.155 ↑ 1.0 200 3 / 3

Hash (cost=6.18..6.18 rows=200 width=24) (actual time=0.155..0.155 rows=200 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 17kB
29. 0.071 0.112 ↑ 1.0 200 3 / 3

Hash Left Join (cost=1.56..6.18 rows=200 width=24) (actual time=0.032..0.112 rows=200 loops=3)

  • Hash Cond: (currencyterritory.currency_id = cur.id)
30. 0.023 0.023 ↑ 1.0 200 3 / 3

Seq Scan on territory currencyterritory (cost=0.00..4.00 rows=200 width=16) (actual time=0.004..0.023 rows=200 loops=3)

31. 0.008 0.018 ↑ 1.0 25 3 / 3

Hash (cost=1.25..1.25 rows=25 width=24) (actual time=0.018..0.018 rows=25 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
32. 0.010 0.010 ↑ 1.0 25 3 / 3

Seq Scan on currency cur (cost=0.00..1.25 rows=25 width=24) (actual time=0.006..0.010 rows=25 loops=3)

33. 0.530 1.467 ↑ 1.0 1,948 3 / 3

Hash (cost=66.15..66.15 rows=1,948 width=29) (actual time=1.467..1.467 rows=1,948 loops=3)

  • Buckets: 2,048 Batches: 1 Memory Usage: 141kB
34. 0.689 0.937 ↑ 1.0 1,948 3 / 3

Hash Left Join (cost=2.17..66.15 rows=1,948 width=29) (actual time=0.032..0.937 rows=1,948 loops=3)

  • Hash Cond: (internationalapprover.default_territory_id = approverassigned.id)
35. 0.230 0.230 ↑ 1.0 1,948 3 / 3

Seq Scan on ""user"" internationalapprover (cost=0.00..58.48 rows=1,948 width=29) (actual time=0.002..0.230 rows=1,948 loops=3)

36. 0.011 0.018 ↑ 1.0 52 3 / 3

Hash (cost=1.52..1.52 rows=52 width=16) (actual time=0.018..0.018 rows=52 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
37. 0.007 0.007 ↑ 1.0 52 3 / 3

Seq Scan on user_assigned_territory approverassigned (cost=0.00..1.52 rows=52 width=16) (actual time=0.002..0.007 rows=52 loops=3)

38. 2.938 5.251 ↓ 1.0 11,841 3 / 3

Hash (cost=331.39..331.39 rows=11,839 width=41) (actual time=5.251..5.251 rows=11,841 loops=3)

  • Buckets: 16,384 Batches: 1 Memory Usage: 900kB
39. 2.313 2.313 ↓ 1.0 11,841 3 / 3

Seq Scan on contact contactsyncclient (cost=0.00..331.39 rows=11,839 width=41) (actual time=0.009..2.313 rows=11,841 loops=3)

40. 0.485 0.870 ↑ 1.0 1,948 3 / 3

Hash (cost=58.48..58.48 rows=1,948 width=21) (actual time=0.870..0.870 rows=1,948 loops=3)

  • Buckets: 2,048 Batches: 1 Memory Usage: 126kB
41. 0.385 0.385 ↑ 1.0 1,948 3 / 3

Seq Scan on ""user"" userlicensemanager (cost=0.00..58.48 rows=1,948 width=21) (actual time=0.004..0.385 rows=1,948 loops=3)

42. 2.302 4.387 ↓ 1.0 11,841 3 / 3

Hash (cost=331.39..331.39 rows=11,839 width=18) (actual time=4.387..4.387 rows=11,841 loops=3)

  • Buckets: 16,384 Batches: 1 Memory Usage: 593kB
43. 2.085 2.085 ↓ 1.0 11,841 3 / 3

Seq Scan on contact contactlicensee (cost=0.00..331.39 rows=11,839 width=18) (actual time=0.004..2.085 rows=11,841 loops=3)

44. 0.000 0.000 ↓ 0.0 0 200,595 / 3

Index Scan using work_pkey on work w (cost=0.43..3.49 rows=1 width=661) (actual time=0.000..0.000 rows=0 loops=200,595)

  • Index Cond: (r.work_id = id)
45. 0.162 0.294 ↓ 1.0 1,114 1

Hash (cost=22.90..22.90 rows=1,090 width=26) (actual time=0.294..0.294 rows=1,114 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 85kB
46. 0.132 0.132 ↓ 1.0 1,114 1

Seq Scan on request_status_item rsi (cost=0.00..22.90 rows=1,090 width=26) (actual time=0.004..0.132 rows=1,114 loops=1)

47.          

SubPlan (for Hash Left Join)

48. 2.228 3.342 ↓ 0.0 0 1,114

Bitmap Heap Scan on request_status_item rsi1 (cost=4.29..9.87 rows=1 width=0) (actual time=0.003..0.003 rows=0 loops=1,114)

  • Recheck Cond: (request_id = r.id)
  • Filter: (id > rsi.id)
  • Rows Removed by Filter: 5
  • Heap Blocks: exact=1,557
49. 1.114 1.114 ↓ 5.0 10 1,114

Bitmap Index Scan on request_status_item_request_id_index (cost=0.00..4.29 rows=2 width=0) (actual time=0.001..0.001 rows=10 loops=1,114)

  • Index Cond: (request_id = r.id)
50. 30.165 72.059 ↓ 1.0 200,661 1

Hash (cost=6,116.10..6,116.10 rows=199,467 width=48) (actual time=72.059..72.059 rows=200,661 loops=1)

  • Buckets: 65,536 Batches: 8 Memory Usage: 1,691kB
51. 41.894 41.894 ↓ 1.0 200,661 1

Seq Scan on project_initial_right pir (cost=0.00..6,116.10 rows=199,467 width=48) (actual time=0.005..41.894 rows=200,661 loops=1)

  • Filter: (parent_project_initial_right_id IS NULL)
  • Rows Removed by Filter: 100,191
52.          

SubPlan (for Hash Left Join)

53. 807.658 807.658 ↑ 1.0 1 403,829

Index Scan using project_initial_right_project_id_index on project_initial_right pir2_7 (cost=0.42..16.35 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=403,829)

  • Index Cond: (project_id = r.project_id)
  • Filter: (id < pir.id)
  • Rows Removed by Filter: 2
54. 0.009 0.107 ↑ 1.0 42 1

Hash (cost=8.81..8.81 rows=42 width=42) (actual time=0.107..0.107 rows=42 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
55. 0.019 0.098 ↑ 1.0 42 1

Hash Left Join (cost=3.51..8.81 rows=42 width=42) (actual time=0.060..0.098 rows=42 loops=1)

  • Hash Cond: (fee_territory_cur.currency_id = fee_cur.id)
56. 0.033 0.069 ↑ 1.0 42 1

Hash Right Join (cost=1.94..7.12 rows=42 width=34) (actual time=0.036..0.069 rows=42 loops=1)

  • Hash Cond: (fee_territory_cur.id = prf.currency_territory_id)
57. 0.016 0.016 ↑ 1.0 200 1

Seq Scan on territory fee_territory_cur (cost=0.00..4.00 rows=200 width=16) (actual time=0.004..0.016 rows=200 loops=1)

58. 0.012 0.020 ↑ 1.0 42 1

Hash (cost=1.42..1.42 rows=42 width=34) (actual time=0.020..0.020 rows=42 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
59. 0.008 0.008 ↑ 1.0 42 1

Seq Scan on project_request_fee prf (cost=0.00..1.42 rows=42 width=34) (actual time=0.004..0.008 rows=42 loops=1)

60. 0.005 0.010 ↑ 1.0 25 1

Hash (cost=1.25..1.25 rows=25 width=24) (actual time=0.010..0.010 rows=25 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
61. 0.005 0.005 ↑ 1.0 25 1

Seq Scan on currency fee_cur (cost=0.00..1.25 rows=25 width=24) (actual time=0.003..0.005 rows=25 loops=1)

62. 0.023 0.041 ↑ 1.0 200 1

Hash (cost=4.00..4.00 rows=200 width=8) (actual time=0.041..0.041 rows=200 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 16kB
63. 0.018 0.018 ↑ 1.0 200 1

Seq Scan on territory internationalapproverterritory (cost=0.00..4.00 rows=200 width=8) (actual time=0.002..0.018 rows=200 loops=1)

64. 200.595 200.595 ↑ 1.0 1 200,595

Index Scan using recording_pkey on recording rec (cost=0.43..3.37 rows=1 width=102) (actual time=0.001..0.001 rows=1 loops=200,595)

  • Index Cond: (r.recording_id = id)
65. 0.000 401.190 ↑ 1.0 1 200,595

Aggregate (cost=11.51..11.52 rows=1 width=1) (actual time=0.002..0.002 rows=1 loops=200,595)

66. 401.190 401.190 ↑ 1.0 2 200,595

Index Scan using request_project_index on project_request rr (cost=0.42..11.51 rows=2 width=8) (actual time=0.001..0.002 rows=2 loops=200,595)

  • Index Cond: (project_id = r.project_id)
67.          

SubPlan (for Nested Loop Left Join)

68. 2,005.950 2,005.950 ↓ 0.0 0 200,595

Seq Scan on right_request_fee (cost=0.00..4.40 rows=1 width=5) (actual time=0.010..0.010 rows=0 loops=200,595)

  • Filter: ((request_id = r.id) AND (parent_right_id = pir.id))
  • Rows Removed by Filter: 160
69. 0.000 2,005.950 ↑ 1.0 1 200,595

Aggregate (cost=4.01..4.02 rows=1 width=32) (actual time=0.010..0.010 rows=1 loops=200,595)

70. 2,005.950 2,005.950 ↓ 0.0 0 200,595

Seq Scan on right_request_fee right_request_fee_1 (cost=0.00..4.00 rows=2 width=5) (actual time=0.010..0.010 rows=0 loops=200,595)

  • Filter: (request_id = r.id)
  • Rows Removed by Filter: 160
71. 0.244 0.244 ↑ 1.0 1 122

Index Scan using label_pkey on label (cost=0.29..8.30 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=122)

  • Index Cond: (id = rec.label_id)
72. 0.122 1.220 ↑ 1.0 1 122

Aggregate (cost=16.90..16.91 rows=1 width=32) (actual time=0.010..0.010 rows=1 loops=122)

73. 0.114 1.098 ↑ 1.0 1 122

Nested Loop (cost=0.85..16.89 rows=1 width=25) (actual time=0.009..0.009 rows=1 loops=122)

74. 0.488 0.488 ↑ 1.0 1 122

Index Scan using recording_artist_recording_id_index on recording_artist ra (cost=0.43..8.45 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=122)

  • Index Cond: (recording_id = rec.id)
75. 0.496 0.496 ↑ 1.0 1 124

Index Scan using artist_pkey on artist a (cost=0.42..8.44 rows=1 width=33) (actual time=0.004..0.004 rows=1 loops=124)

  • Index Cond: (id = ra.artist_id)
76. 0.000 0.488 ↑ 1.0 1 122

Aggregate (cost=28.57..28.58 rows=1 width=32) (actual time=0.004..0.004 rows=1 loops=122)

77. 0.071 0.488 ↓ 0.0 0 122

Nested Loop (cost=4.73..28.57 rows=2 width=20) (actual time=0.004..0.004 rows=0 loops=122)

78. 0.122 0.366 ↓ 0.0 0 122

Bitmap Heap Scan on recording_writer rw (cost=4.30..11.68 rows=2 width=8) (actual time=0.002..0.003 rows=0 loops=122)

  • Recheck Cond: (recording_id = rec.id)
  • Heap Blocks: exact=10
79. 0.244 0.244 ↓ 0.0 0 122

Bitmap Index Scan on recording_writer_recording_id_index (cost=0.00..4.30 rows=2 width=0) (actual time=0.002..0.002 rows=0 loops=122)

  • Index Cond: (recording_id = rec.id)
80. 0.051 0.051 ↑ 1.0 1 17

Index Scan using creator_pkey on writer w_1 (cost=0.43..8.45 rows=1 width=28) (actual time=0.003..0.003 rows=1 loops=17)

  • Index Cond: (id = rw.writer_id)
81. 200.355 1,002.975 ↓ 0.0 0 200,595

Nested Loop Semi Join (cost=2.11..22.16 rows=1 width=0) (actual time=0.005..0.005 rows=0 loops=200,595)

82. 802.380 802.380 ↓ 0.0 0 200,595

Index Scan using license_status_index on project_license pl (cost=0.42..8.76 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=200,595)

  • Index Cond: ((status)::text = 'SENT'::text)
  • Filter: (project_id = r.project_id)
  • Rows Removed by Filter: 10
83. 0.025 0.240 ↑ 2.0 1 40

Nested Loop Left Join (cost=1.69..13.39 rows=2 width=8) (actual time=0.006..0.006 rows=1 loops=40)

  • Filter: (((ru_ov.id IS NOT NULL) AND ru_ov.is_active) OR ((ru_ov.id IS NULL) AND ru.is_active))
  • Rows Removed by Filter: 1
84. 0.020 0.160 ↑ 2.0 1 40

Nested Loop (cost=0.84..11.27 rows=2 width=17) (actual time=0.004..0.004 rows=1 loops=40)

85. 0.080 0.080 ↑ 2.0 1 40

Index Scan using project_initial_right_project_license_id_index on project_initial_right pir_ru (cost=0.42..10.29 rows=2 width=16) (actual time=0.002..0.002 rows=1 loops=40)

  • Index Cond: (project_license_id = pl.id)
86. 0.060 0.060 ↓ 2.0 2 30

Index Scan using right_use_recording_id_index on right_use ru (cost=0.42..0.48 rows=1 width=17) (actual time=0.001..0.002 rows=2 loops=30)

  • Index Cond: (project_initial_right_id = pir_ru.id)
87. 0.000 0.055 ↓ 0.0 0 55

Nested Loop Semi Join (cost=0.84..1.05 rows=1 width=17) (actual time=0.001..0.001 rows=0 loops=55)

88. 0.055 0.055 ↓ 0.0 0 55

Index Scan using override_source_right_use_id_index on right_use ru_ov (cost=0.42..0.48 rows=1 width=25) (actual time=0.001..0.001 rows=0 loops=55)

  • Index Cond: (override_source_right_use_id = ru.id)
89. 0.000 0.000 ↓ 0.0 0

Index Scan using project_initial_right_pkey on project_initial_right pir2 (cost=0.42..0.49 rows=1 width=8) (never executed)

  • Index Cond: (id = ru_ov.project_initial_right_id)
  • Filter: (override_request_id = r.id)
90. 0.000 1,002.975 ↓ 0.0 0 200,595

Nested Loop Semi Join (cost=2.11..22.16 rows=1 width=0) (actual time=0.005..0.005 rows=0 loops=200,595)

91. 1,002.975 1,002.975 ↓ 0.0 0 200,595

Index Scan using license_status_index on project_license pl_1 (cost=0.42..8.76 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=200,595)

  • Index Cond: ((status)::text = 'PARTIALLY_EXECUTED'::text)
  • Filter: (project_id = r.project_id)
  • Rows Removed by Filter: 16
92. 0.016 0.582 ↑ 2.0 1 97

Nested Loop Left Join (cost=1.69..13.39 rows=2 width=8) (actual time=0.006..0.006 rows=1 loops=97)

  • Filter: (((ru_ov_1.id IS NOT NULL) AND ru_ov_1.is_active) OR ((ru_ov_1.id IS NULL) AND ru_1.is_active))
  • Rows Removed by Filter: 0
93. 0.105 0.388 ↑ 2.0 1 97

Nested Loop (cost=0.84..11.27 rows=2 width=17) (actual time=0.004..0.004 rows=1 loops=97)

94. 0.194 0.194 ↑ 2.0 1 97

Index Scan using project_initial_right_project_license_id_index on project_initial_right pir_ru_1 (cost=0.42..10.29 rows=2 width=16) (actual time=0.002..0.002 rows=1 loops=97)

  • Index Cond: (project_license_id = pl_1.id)
95. 0.089 0.089 ↑ 1.0 1 89

Index Scan using right_use_recording_id_index on right_use ru_1 (cost=0.42..0.48 rows=1 width=17) (actual time=0.001..0.001 rows=1 loops=89)

  • Index Cond: (project_initial_right_id = pir_ru_1.id)
96. 0.031 0.178 ↓ 0.0 0 89

Nested Loop Semi Join (cost=0.84..1.05 rows=1 width=17) (actual time=0.002..0.002 rows=0 loops=89)

97. 0.089 0.089 ↓ 0.0 0 89

Index Scan using override_source_right_use_id_index on right_use ru_ov_1 (cost=0.42..0.48 rows=1 width=25) (actual time=0.001..0.001 rows=0 loops=89)

  • Index Cond: (override_source_right_use_id = ru_1.id)
98. 0.058 0.058 ↓ 0.0 0 29

Index Scan using project_initial_right_pkey on project_initial_right pir2_1 (cost=0.42..0.49 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=29)

  • Index Cond: (id = ru_ov_1.project_initial_right_id)
  • Filter: (override_request_id = r.id)
  • Rows Removed by Filter: 1
99. 200.535 802.380 ↓ 0.0 0 200,595

Nested Loop Semi Join (cost=2.11..22.16 rows=1 width=0) (actual time=0.004..0.004 rows=0 loops=200,595)

100. 601.785 601.785 ↓ 0.0 0 200,595

Index Scan using license_status_index on project_license pl_2 (cost=0.42..8.76 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=200,595)

  • Index Cond: ((status)::text = 'FULLY_EXECUTED'::text)
  • Filter: (project_id = r.project_id)
  • Rows Removed by Filter: 6
101. 0.000 0.060 ↓ 0.0 0 30

Nested Loop Left Join (cost=1.69..13.39 rows=2 width=8) (actual time=0.002..0.002 rows=0 loops=30)

  • Filter: (((ru_ov_2.id IS NOT NULL) AND ru_ov_2.is_active) OR ((ru_ov_2.id IS NULL) AND ru_2.is_active))
102. 0.022 0.060 ↓ 0.0 0 30

Nested Loop (cost=0.84..11.27 rows=2 width=17) (actual time=0.002..0.002 rows=0 loops=30)

103. 0.030 0.030 ↓ 0.0 0 30

Index Scan using project_initial_right_project_license_id_index on project_initial_right pir_ru_2 (cost=0.42..10.29 rows=2 width=16) (actual time=0.001..0.001 rows=0 loops=30)

  • Index Cond: (project_license_id = pl_2.id)
104. 0.008 0.008 ↑ 1.0 1 4

Index Scan using right_use_recording_id_index on right_use ru_2 (cost=0.42..0.48 rows=1 width=17) (actual time=0.002..0.002 rows=1 loops=4)

  • Index Cond: (project_initial_right_id = pir_ru_2.id)
105. 0.000 0.004 ↓ 0.0 0 4

Nested Loop Semi Join (cost=0.84..1.05 rows=1 width=17) (actual time=0.001..0.001 rows=0 loops=4)

106. 0.004 0.004 ↓ 0.0 0 4

Index Scan using override_source_right_use_id_index on right_use ru_ov_2 (cost=0.42..0.48 rows=1 width=25) (actual time=0.001..0.001 rows=0 loops=4)

  • Index Cond: (override_source_right_use_id = ru_2.id)
107. 0.000 0.000 ↓ 0.0 0

Index Scan using project_initial_right_pkey on project_initial_right pir2_2 (cost=0.42..0.49 rows=1 width=8) (never executed)

  • Index Cond: (id = ru_ov_2.project_initial_right_id)
  • Filter: (override_request_id = r.id)
108. 197.109 1,604.760 ↑ 1.0 1 200,595

Nested Loop Left Join (cost=2.11..108.41 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=200,595)

  • Filter: (((SubPlan 9) AND (ru_ov_3.id IS NOT NULL) AND ru_ov_3.is_exercised) OR (((ru_ov_3.id IS NULL) OR (ru_ov_3.is_exercised IS NULL)) AND ru_3.is_exercised))
  • Rows Removed by Filter: 0
109. 200.595 802.380 ↑ 3.0 1 200,595

Nested Loop Left Join (cost=1.27..67.02 rows=3 width=25) (actual time=0.004..0.004 rows=1 loops=200,595)

110. 199.896 601.785 ↑ 3.0 1 200,595

Nested Loop (cost=0.84..41.70 rows=3 width=25) (actual time=0.003..0.003 rows=1 loops=200,595)

111. 200.595 200.595 ↑ 3.0 1 200,595

Index Scan using project_initial_right_project_id_index on project_initial_right pir_ru_3 (cost=0.42..16.35 rows=3 width=24) (actual time=0.001..0.001 rows=1 loops=200,595)

  • Index Cond: (project_id = r.project_id)
  • Filter: ((override_request_id IS NULL) OR ((override_request_id IS NOT NULL) AND (override_request_id = r.id)))
  • Rows Removed by Filter: 0
112. 201.294 201.294 ↑ 1.0 1 201,294

Index Scan using right_use_recording_id_index on right_use ru_3 (cost=0.42..8.44 rows=1 width=17) (actual time=0.001..0.001 rows=1 loops=201,294)

  • Index Cond: (project_initial_right_id = pir_ru_3.id)
113. 0.000 0.000 ↓ 0.0 0 201,757

Index Scan using project_initial_right_pkey on project_initial_right pir_ru_parent (cost=0.42..8.44 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=201,757)

  • Index Cond: (pir_ru_3.override_source_right_id = id)
114. 0.000 201.757 ↓ 0.0 0 201,757

Nested Loop Semi Join (cost=0.84..1.05 rows=1 width=17) (actual time=0.001..0.001 rows=0 loops=201,757)

115. 201.757 201.757 ↓ 0.0 0 201,757

Index Scan using override_source_right_use_id_index on right_use ru_ov_3 (cost=0.42..0.48 rows=1 width=25) (actual time=0.001..0.001 rows=0 loops=201,757)

  • Index Cond: (override_source_right_use_id = ru_3.id)
116. 0.257 0.257 ↓ 0.0 0 257

Index Scan using project_initial_right_pkey on project_initial_right pir2_3 (cost=0.42..0.49 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=257)

  • Index Cond: (id = ru_ov_3.project_initial_right_id)
  • Filter: (override_request_id = r.id)
  • Rows Removed by Filter: 1
117.          

SubPlan (for Nested Loop Left Join)

118. 201.757 403.514 ↑ 2.0 1 201,757

Bitmap Heap Scan on project_invoice_license pil (cost=8.86..16.63 rows=2 width=0) (actual time=0.002..0.002 rows=1 loops=201,757)

  • Recheck Cond: ((license_id = pir_ru_3.project_license_id) OR (license_id = pir_ru_parent.project_license_id))
  • Heap Blocks: exact=200,238
119. 0.000 201.757 ↓ 0.0 0 201,757

BitmapOr (cost=8.86..8.86 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=201,757)

120. 201.757 201.757 ↑ 1.0 1 201,757

Bitmap Index Scan on project_invoice_license_license_id_index (cost=0.00..4.43 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=201,757)

  • Index Cond: (license_id = pir_ru_3.project_license_id)
121. 0.000 0.000 ↓ 0.0 0 201,757

Bitmap Index Scan on project_invoice_license_license_id_index (cost=0.00..4.43 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=201,757)

  • Index Cond: (license_id = pir_ru_parent.project_license_id)
122. 396.593 2,005.950 ↑ 1.0 1 200,595

Hash Left Join (cost=29.83..129.13 rows=1 width=0) (actual time=0.010..0.010 rows=1 loops=200,595)

  • Hash Cond: (ru_4.id = ru_ov_4.override_source_right_use_id)
  • Filter: (((SubPlan 11) AND (ru_ov_4.id IS NOT NULL) AND ru_ov_4.is_exercised) OR (((ru_ov_4.id IS NULL) OR (ru_ov_4.is_exercised IS NULL)) AND ru_4.is_exercised))
  • Rows Removed by Filter: 0
123. 0.000 601.785 ↑ 3.0 1 200,595

Nested Loop Left Join (cost=1.27..67.02 rows=3 width=25) (actual time=0.003..0.003 rows=1 loops=200,595)

124. 199.896 601.785 ↑ 3.0 1 200,595

Nested Loop (cost=0.84..41.70 rows=3 width=25) (actual time=0.003..0.003 rows=1 loops=200,595)

125. 200.595 200.595 ↑ 3.0 1 200,595

Index Scan using project_initial_right_project_id_index on project_initial_right pir_ru_4 (cost=0.42..16.35 rows=3 width=24) (actual time=0.001..0.001 rows=1 loops=200,595)

  • Index Cond: (project_id = r.project_id)
  • Filter: ((override_request_id IS NULL) OR ((override_request_id IS NOT NULL) AND (override_request_id = r.id)))
  • Rows Removed by Filter: 0
126. 201.294 201.294 ↑ 1.0 1 201,294

Index Scan using right_use_recording_id_index on right_use ru_4 (cost=0.42..8.44 rows=1 width=17) (actual time=0.001..0.001 rows=1 loops=201,294)

  • Index Cond: (project_initial_right_id = pir_ru_4.id)
127. 0.000 0.000 ↓ 0.0 0 201,757

Index Scan using project_initial_right_pkey on project_initial_right pir_ru_parent_1 (cost=0.42..8.44 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=201,757)

  • Index Cond: (pir_ru_4.override_source_right_id = id)
128. 0.000 200.544 ↓ 0.0 0 200,544

Hash (cost=28.53..28.53 rows=2 width=17) (actual time=0.001..0.001 rows=0 loops=200,544)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
129. 0.000 200.544 ↓ 0.0 0 200,544

Nested Loop (cost=0.84..28.53 rows=2 width=17) (actual time=0.001..0.001 rows=0 loops=200,544)

130. 200.544 200.544 ↓ 0.0 0 200,544

Index Scan using project_initial_right_override_request_id_index on project_initial_right pir2_4 (cost=0.42..11.63 rows=2 width=8) (actual time=0.001..0.001 rows=0 loops=200,544)

  • Index Cond: (override_request_id = r.id)
131. 0.243 0.243 ↑ 1.0 1 243

Index Scan using right_use_recording_id_index on right_use ru_ov_4 (cost=0.42..8.44 rows=1 width=25) (actual time=0.001..0.001 rows=1 loops=243)

  • Index Cond: (project_initial_right_id = pir2_4.id)
132.          

SubPlan (for Hash Left Join)

133. 203.276 807.028 ↑ 1.0 1 201,757

Nested Loop (cost=9.28..33.54 rows=1 width=0) (actual time=0.004..0.004 rows=1 loops=201,757)

134. 201.757 403.514 ↑ 2.0 1 201,757

Bitmap Heap Scan on project_invoice_license pil_1 (cost=8.86..16.63 rows=2 width=16) (actual time=0.002..0.002 rows=1 loops=201,757)

  • Recheck Cond: ((license_id = pir_ru_4.project_license_id) OR (license_id = pir_ru_parent_1.project_license_id))
  • Heap Blocks: exact=200,238
135. 0.000 201.757 ↓ 0.0 0 201,757

BitmapOr (cost=8.86..8.86 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=201,757)

136. 201.757 201.757 ↑ 1.0 1 201,757

Bitmap Index Scan on project_invoice_license_license_id_index (cost=0.00..4.43 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=201,757)

  • Index Cond: (license_id = pir_ru_4.project_license_id)
137. 0.000 0.000 ↓ 0.0 0 201,757

Bitmap Index Scan on project_invoice_license_license_id_index (cost=0.00..4.43 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=201,757)

  • Index Cond: (license_id = pir_ru_parent_1.project_license_id)
138. 200.238 200.238 ↑ 1.0 1 200,238

Index Scan using project_invoice_pkey on project_invoice inv (cost=0.42..8.45 rows=1 width=14) (actual time=0.001..0.001 rows=1 loops=200,238)

  • Index Cond: (id = pil_1.invoice_id)
  • Filter: ((pil_1.license_id = pir_ru_4.project_license_id) OR ((pil_1.license_id = pir_ru_parent_1.project_license_id) AND (status = ANY ('{SENT_TO_SAP,FINAL_SENT}'::text[]))))
  • Rows Removed by Filter: 0
139. 396.593 2,005.950 ↑ 1.0 1 200,595

Hash Left Join (cost=29.83..129.14 rows=1 width=0) (actual time=0.010..0.010 rows=1 loops=200,595)

  • Hash Cond: (ru_5.id = ru_ov_5.override_source_right_use_id)
  • Filter: (((SubPlan 13) AND (ru_ov_5.id IS NOT NULL) AND ru_ov_5.is_exercised) OR (((ru_ov_5.id IS NULL) OR (ru_ov_5.is_exercised IS NULL)) AND ru_5.is_exercised))
  • Rows Removed by Filter: 0
140. 0.000 601.785 ↑ 3.0 1 200,595

Nested Loop Left Join (cost=1.27..67.02 rows=3 width=25) (actual time=0.003..0.003 rows=1 loops=200,595)

141. 199.896 601.785 ↑ 3.0 1 200,595

Nested Loop (cost=0.84..41.70 rows=3 width=25) (actual time=0.003..0.003 rows=1 loops=200,595)

142. 200.595 200.595 ↑ 3.0 1 200,595

Index Scan using project_initial_right_project_id_index on project_initial_right pir_ru_5 (cost=0.42..16.35 rows=3 width=24) (actual time=0.001..0.001 rows=1 loops=200,595)

  • Index Cond: (project_id = r.project_id)
  • Filter: ((override_request_id IS NULL) OR ((override_request_id IS NOT NULL) AND (override_request_id = r.id)))
  • Rows Removed by Filter: 0
143. 201.294 201.294 ↑ 1.0 1 201,294

Index Scan using right_use_recording_id_index on right_use ru_5 (cost=0.42..8.44 rows=1 width=17) (actual time=0.001..0.001 rows=1 loops=201,294)

  • Index Cond: (project_initial_right_id = pir_ru_5.id)
144. 0.000 0.000 ↓ 0.0 0 201,757

Index Scan using project_initial_right_pkey on project_initial_right pir_ru_parent_2 (cost=0.42..8.44 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=201,757)

  • Index Cond: (pir_ru_5.override_source_right_id = id)
145. 0.000 200.544 ↓ 0.0 0 200,544

Hash (cost=28.53..28.53 rows=2 width=17) (actual time=0.001..0.001 rows=0 loops=200,544)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
146. 0.000 200.544 ↓ 0.0 0 200,544

Nested Loop (cost=0.84..28.53 rows=2 width=17) (actual time=0.001..0.001 rows=0 loops=200,544)

147. 200.544 200.544 ↓ 0.0 0 200,544

Index Scan using project_initial_right_override_request_id_index on project_initial_right pir2_5 (cost=0.42..11.63 rows=2 width=8) (actual time=0.001..0.001 rows=0 loops=200,544)

  • Index Cond: (override_request_id = r.id)
148. 0.243 0.243 ↑ 1.0 1 243

Index Scan using right_use_recording_id_index on right_use ru_ov_5 (cost=0.42..8.44 rows=1 width=25) (actual time=0.001..0.001 rows=1 loops=243)

  • Index Cond: (project_initial_right_id = pir2_5.id)
149.          

SubPlan (for Hash Left Join)

150. 203.276 807.028 ↑ 1.0 1 201,757

Nested Loop (cost=9.28..33.54 rows=1 width=0) (actual time=0.004..0.004 rows=1 loops=201,757)

151. 201.757 403.514 ↑ 2.0 1 201,757

Bitmap Heap Scan on project_invoice_license pil_2 (cost=8.86..16.63 rows=2 width=16) (actual time=0.002..0.002 rows=1 loops=201,757)

  • Recheck Cond: ((license_id = pir_ru_5.project_license_id) OR (license_id = pir_ru_parent_2.project_license_id))
  • Heap Blocks: exact=200,238
152. 0.000 201.757 ↓ 0.0 0 201,757

BitmapOr (cost=8.86..8.86 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=201,757)

153. 201.757 201.757 ↑ 1.0 1 201,757

Bitmap Index Scan on project_invoice_license_license_id_index (cost=0.00..4.43 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=201,757)

  • Index Cond: (license_id = pir_ru_5.project_license_id)
154. 0.000 0.000 ↓ 0.0 0 201,757

Bitmap Index Scan on project_invoice_license_license_id_index (cost=0.00..4.43 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=201,757)

  • Index Cond: (license_id = pir_ru_parent_2.project_license_id)
155. 200.238 200.238 ↑ 1.0 1 200,238

Index Scan using project_invoice_pkey on project_invoice inv_1 (cost=0.42..8.45 rows=1 width=14) (actual time=0.001..0.001 rows=1 loops=200,238)

  • Index Cond: (id = pil_2.invoice_id)
  • Filter: ((pil_2.license_id = pir_ru_5.project_license_id) OR ((pil_2.license_id = pir_ru_parent_2.project_license_id) AND (status = ANY ('{SENT_TO_SAP,FINAL_SENT,PARTIALLY_PAID,PAID}'::text[]))))
  • Rows Removed by Filter: 0
156. 0.000 0.000 ↓ 0.0 0

Index Scan using project_initial_right_override_request_id_index on project_initial_right (cost=0.42..11.63 rows=1 width=0) (never executed)

  • Index Cond: (override_request_id = r.id)
  • Filter: (exclusivity_id IS NOT NULL)
157. 3.463 18.878 ↓ 1.0 52 1

Gather (cost=1,000.00..5,366.38 rows=50 width=8) (actual time=0.837..18.878 rows=52 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
158. 15.415 15.415 ↑ 1.2 17 3 / 3

Parallel Seq Scan on project_initial_right project_initial_right_1 (cost=0.00..4,361.38 rows=21 width=8) (actual time=9.441..15.415 rows=17 loops=3)

  • Filter: (exclusivity_id IS NOT NULL)
  • Rows Removed by Filter: 100,267
159. 197.109 1,404.165 ↑ 1.0 1 200,595

Nested Loop Left Join (cost=2.11..108.41 rows=1 width=0) (actual time=0.007..0.007 rows=1 loops=200,595)

  • Filter: (((SubPlan 17) AND (ru_ov_6.id IS NOT NULL) AND ru_ov_6.is_exercised) OR (((ru_ov_6.id IS NULL) OR (ru_ov_6.is_exercised IS NULL)) AND ru_6.is_exercised))
  • Rows Removed by Filter: 0
160. 0.000 601.785 ↑ 3.0 1 200,595

Nested Loop Left Join (cost=1.27..67.02 rows=3 width=25) (actual time=0.003..0.003 rows=1 loops=200,595)

161. 199.896 601.785 ↑ 3.0 1 200,595

Nested Loop (cost=0.84..41.70 rows=3 width=25) (actual time=0.003..0.003 rows=1 loops=200,595)

162. 200.595 200.595 ↑ 3.0 1 200,595

Index Scan using project_initial_right_project_id_index on project_initial_right pir_ru_6 (cost=0.42..16.35 rows=3 width=24) (actual time=0.001..0.001 rows=1 loops=200,595)

  • Index Cond: (project_id = r.project_id)
  • Filter: ((override_request_id IS NULL) OR ((override_request_id IS NOT NULL) AND (override_request_id = r.id)))
  • Rows Removed by Filter: 0
163. 201.294 201.294 ↑ 1.0 1 201,294

Index Scan using right_use_recording_id_index on right_use ru_6 (cost=0.42..8.44 rows=1 width=17) (actual time=0.001..0.001 rows=1 loops=201,294)

  • Index Cond: (project_initial_right_id = pir_ru_6.id)
164. 0.000 0.000 ↓ 0.0 0 201,757

Index Scan using project_initial_right_pkey on project_initial_right pir_ru_parent_3 (cost=0.42..8.44 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=201,757)

  • Index Cond: (pir_ru_6.override_source_right_id = id)
165. 0.000 201.757 ↓ 0.0 0 201,757

Nested Loop Semi Join (cost=0.84..1.05 rows=1 width=17) (actual time=0.001..0.001 rows=0 loops=201,757)

166. 201.757 201.757 ↓ 0.0 0 201,757

Index Scan using override_source_right_use_id_index on right_use ru_ov_6 (cost=0.42..0.48 rows=1 width=25) (actual time=0.001..0.001 rows=0 loops=201,757)

  • Index Cond: (override_source_right_use_id = ru_6.id)
167. 0.257 0.257 ↓ 0.0 0 257

Index Scan using project_initial_right_pkey on project_initial_right pir2_6 (cost=0.42..0.49 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=257)

  • Index Cond: (id = ru_ov_6.project_initial_right_id)
  • Filter: (override_request_id = r.id)
  • Rows Removed by Filter: 1
168.          

SubPlan (for Nested Loop Left Join)

169. 201.757 403.514 ↑ 2.0 1 201,757

Bitmap Heap Scan on project_invoice_license pil_3 (cost=8.86..16.63 rows=2 width=0) (actual time=0.002..0.002 rows=1 loops=201,757)

  • Recheck Cond: ((license_id = pir_ru_6.project_license_id) OR (license_id = pir_ru_parent_3.project_license_id))
  • Heap Blocks: exact=200,238
170. 0.000 201.757 ↓ 0.0 0 201,757

BitmapOr (cost=8.86..8.86 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=201,757)

171. 201.757 201.757 ↑ 1.0 1 201,757

Bitmap Index Scan on project_invoice_license_license_id_index (cost=0.00..4.43 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=201,757)

  • Index Cond: (license_id = pir_ru_6.project_license_id)
172. 0.000 0.000 ↓ 0.0 0 201,757

Bitmap Index Scan on project_invoice_license_license_id_index (cost=0.00..4.43 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=201,757)

  • Index Cond: (license_id = pir_ru_parent_3.project_license_id)
173. 0.000 0.000 ↓ 0.0 0

Index Scan using project_initial_right_override_request_id_index on project_initial_right project_initial_right_2 (cost=0.42..11.63 rows=1 width=0) (never executed)

  • Index Cond: (override_request_id = r.id)
  • Filter: (royalty_bearing_id IS NOT NULL)
174. 2.968 18.367 ↑ 1.1 35 1

Gather (cost=1,000.00..5,365.38 rows=40 width=8) (actual time=0.832..18.367 rows=35 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
175. 15.399 15.399 ↑ 1.4 12 3 / 3

Parallel Seq Scan on project_initial_right project_initial_right_3 (cost=0.00..4,361.38 rows=17 width=8) (actual time=9.589..15.399 rows=12 loops=3)

  • Filter: (royalty_bearing_id IS NOT NULL)
  • Rows Removed by Filter: 100,272