explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RLhZ

Settings
# exclusive inclusive rows x rows loops node
1. 19.018 683.890 ↑ 1.3 1,339 1

Nested Loop Left Join (cost=4,590.07..1,049,773.37 rows=1,804 width=748) (actual time=43.657..683.890 rows=1,339 loops=1)

2. 32.031 132.997 ↑ 1.3 1,339 1

Hash Left Join (cost=4,579.60..79,174.05 rows=1,804 width=1,103) (actual time=42.910..132.997 rows=1,339 loops=1)

  • Hash Cond: (r.project_id = pir.project_id)
  • Join Filter: (NOT (SubPlan 22))
  • Rows Removed by Join Filter: 2,597
3. 1.786 84.569 ↑ 1.0 1,339 1

Nested Loop Left Join (cost=4,508.84..29,546.78 rows=1,340 width=1,065) (actual time=42.017..84.569 rows=1,339 loops=1)

4. 0.556 78.766 ↑ 1.0 1,339 1

Hash Left Join (cost=4,508.41..18,283.78 rows=1,340 width=972) (actual time=42.001..78.766 rows=1,339 loops=1)

  • Hash Cond: (approverassigned.territory_id = internationalapproverterritory.id)
5. 0.545 78.151 ↑ 1.0 1,339 1

Hash Left Join (cost=4,501.91..18,273.68 rows=1,340 width=972) (actual time=41.934..78.151 rows=1,339 loops=1)

  • Hash Cond: (r.approver_fee_id = prf.id)
6. 1.489 77.446 ↑ 1.0 1,339 1

Hash Left Join (cost=4,492.87..18,259.26 rows=1,340 width=946) (actual time=41.768..77.446 rows=1,339 loops=1)

  • Hash Cond: (r.id = rsi.request_id)
  • Join Filter: (NOT (SubPlan 21))
  • Rows Removed by Join Filter: 421
7. 21.288 73.559 ↑ 1.0 1,339 1

Gather (cost=4,468.49..11,399.23 rows=1,340 width=936) (actual time=41.550..73.559 rows=1,339 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 0.235 52.271 ↑ 1.3 446 3 / 3

Hash Left Join (cost=3,468.49..10,265.23 rows=558 width=936) (actual time=36.943..52.271 rows=446 loops=3)

  • Hash Cond: (internationalapprover.default_territory_id = approverassigned.id)
9. 0.221 52.004 ↑ 1.3 446 3 / 3

Hash Left Join (cost=3,466.32..10,261.49 rows=558 width=936) (actual time=36.900..52.004 rows=446 loops=3)

  • Hash Cond: (r.intl_approver_user_id = internationalapprover.id)
10. 0.557 50.968 ↑ 1.3 446 3 / 3

Nested Loop Left Join (cost=3,383.54..10,177.24 rows=558 width=923) (actual time=36.066..50.968 rows=446 loops=3)

11. 0.275 50.411 ↑ 1.3 446 3 / 3

Hash Left Join (cost=3,383.11..5,636.76 rows=558 width=267) (actual time=36.058..50.411 rows=446 loops=3)

  • Hash Cond: (p.licensee_contact_id = contactlicensee.id)
12. 0.238 46.664 ↑ 1.3 446 3 / 3

Hash Left Join (cost=2,905.27..5,157.46 rows=558 width=265) (actual time=32.499..46.664 rows=446 loops=3)

  • Hash Cond: (p.license_manager_user_id = userlicensemanager.id)
13. 0.350 45.568 ↑ 1.3 446 3 / 3

Hash Left Join (cost=2,822.49..5,073.21 rows=558 width=260) (actual time=31.619..45.568 rows=446 loops=3)

  • Hash Cond: (p.sync_client_contact_id = contactsyncclient.id)
14. 3.092 38.542 ↑ 1.3 446 3 / 3

Merge Join (cost=2,344.65..4,593.91 rows=558 width=235) (actual time=24.837..38.542 rows=446 loops=3)

  • Merge Cond: (p.id = r.project_id)
15. 6.421 6.421 ↑ 1.2 22,673 3 / 3

Parallel Index Scan using project_pkey on project p (cost=0.29..2,924.29 rows=28,341 width=65) (actual time=0.028..6.421 rows=22,673 loops=3)

16. 0.472 29.029 ↑ 1.9 707 3 / 3

Materialize (cost=1,200.46..2,801.54 rows=1,340 width=186) (actual time=14.200..29.029 rows=707 loops=3)

17. 6.780 28.557 ↑ 1.9 707 3 / 3

Merge Join (cost=1,200.46..2,798.19 rows=1,340 width=186) (actual time=14.194..28.557 rows=707 loops=3)

  • Merge Cond: (playlist.project_id = r.project_id)
18. 16.095 16.095 ↑ 1.0 67,694 3 / 3

Index Scan using project_playlist_project_id_index on project_playlist playlist (cost=0.29..2,392.97 rows=68,018 width=31) (actual time=0.030..16.095 rows=67,694 loops=3)

19. 0.892 5.682 ↑ 1.9 707 3 / 3

Sort (cost=220.14..223.49 rows=1,340 width=155) (actual time=5.551..5.682 rows=707 loops=3)

  • Sort Key: r.project_id
  • Sort Method: quicksort Memory: 236kB
20. 0.360 4.790 ↑ 1.0 1,339 3 / 3

Hash Left Join (cost=100.13..150.54 rows=1,340 width=155) (actual time=2.844..4.790 rows=1,339 loops=3)

  • Hash Cond: (assigned.territory_id = userauthorterritory.id)
21. 0.354 4.349 ↑ 1.0 1,339 3 / 3

Hash Left Join (cost=93.63..140.45 rows=1,340 width=155) (actual time=2.752..4.349 rows=1,339 loops=3)

  • Hash Cond: (userauthor.default_territory_id = assigned.id)
22. 0.386 3.676 ↑ 1.0 1,339 3 / 3

Hash Left Join (cost=91.46..134.49 rows=1,340 width=155) (actual time=2.419..3.676 rows=1,339 loops=3)

  • Hash Cond: (r.sync_author_user_id = userauthor.id)
23. 0.746 1.979 ↑ 1.0 1,339 3 / 3

Hash Left Join (cost=8.68..48.19 rows=1,340 width=142) (actual time=1.091..1.979 rows=1,339 loops=3)

  • Hash Cond: (r.currency_territory_id = currencyterritory.id)
24. 0.582 0.582 ↑ 1.0 1,339 3 / 3

Seq Scan on project_request r (cost=0.00..34.40 rows=1,340 width=134) (actual time=0.302..0.582 rows=1,339 loops=3)

25. 0.038 0.651 ↑ 1.0 200 3 / 3

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 17kB
26. 0.073 0.613 ↑ 1.0 200 3 / 3

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

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

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

28. 0.014 0.274 ↑ 1.0 25 3 / 3

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

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

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

30. 0.497 1.311 ↓ 1.0 1,947 3 / 3

Hash (cost=58.46..58.46 rows=1,946 width=29) (actual time=1.311..1.311 rows=1,947 loops=3)

  • Buckets: 2,048 Batches: 1 Memory Usage: 141kB
31. 0.814 0.814 ↓ 1.0 1,947 3 / 3

Seq Scan on ""user"" userauthor (cost=0.00..58.46 rows=1,946 width=29) (actual time=0.257..0.814 rows=1,947 loops=3)

32. 0.017 0.319 ↑ 1.0 52 3 / 3

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

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

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

34. 0.042 0.081 ↑ 1.0 200 3 / 3

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

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

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

36. 3.012 6.676 ↑ 1.0 11,815 3 / 3

Hash (cost=330.15..330.15 rows=11,815 width=41) (actual time=6.676..6.676 rows=11,815 loops=3)

  • Buckets: 16,384 Batches: 1 Memory Usage: 898kB
37. 3.664 3.664 ↑ 1.0 11,815 3 / 3

Seq Scan on contact contactsyncclient (cost=0.00..330.15 rows=11,815 width=41) (actual time=0.460..3.664 rows=11,815 loops=3)

38. 0.481 0.858 ↓ 1.0 1,947 3 / 3

Hash (cost=58.46..58.46 rows=1,946 width=21) (actual time=0.858..0.858 rows=1,947 loops=3)

  • Buckets: 2,048 Batches: 1 Memory Usage: 126kB
39. 0.377 0.377 ↓ 1.0 1,947 3 / 3

Seq Scan on ""user"" userlicensemanager (cost=0.00..58.46 rows=1,946 width=21) (actual time=0.021..0.377 rows=1,947 loops=3)

40. 1.849 3.472 ↑ 1.0 11,815 3 / 3

Hash (cost=330.15..330.15 rows=11,815 width=18) (actual time=3.472..3.472 rows=11,815 loops=3)

  • Buckets: 16,384 Batches: 1 Memory Usage: 592kB
41. 1.623 1.623 ↑ 1.0 11,815 3 / 3

Seq Scan on contact contactlicensee (cost=0.00..330.15 rows=11,815 width=18) (actual time=0.020..1.623 rows=11,815 loops=3)

42. 0.000 0.000 ↓ 0.0 0 1,339 / 3

Index Scan using work_pkey on work w (cost=0.43..8.14 rows=1 width=672) (actual time=0.000..0.000 rows=0 loops=1,339)

  • Index Cond: (r.work_id = id)
43. 0.419 0.815 ↓ 1.0 1,947 3 / 3

Hash (cost=58.46..58.46 rows=1,946 width=29) (actual time=0.815..0.815 rows=1,947 loops=3)

  • Buckets: 2,048 Batches: 1 Memory Usage: 141kB
44. 0.396 0.396 ↓ 1.0 1,947 3 / 3

Seq Scan on ""user"" internationalapprover (cost=0.00..58.46 rows=1,946 width=29) (actual time=0.035..0.396 rows=1,947 loops=3)

45. 0.016 0.032 ↑ 1.0 52 3 / 3

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

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

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

47. 0.116 0.214 ↑ 1.0 728 1

Hash (cost=15.28..15.28 rows=728 width=26) (actual time=0.214..0.214 rows=728 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 53kB
48. 0.098 0.098 ↑ 1.0 728 1

Seq Scan on request_status_item rsi (cost=0.00..15.28 rows=728 width=26) (actual time=0.012..0.098 rows=728 loops=1)

49.          

SubPlan (for Hash Left Join)

50. 2.184 2.184 ↑ 1.0 1 728

Index Scan using request_status_item_request_id_index on request_status_item rsi1 (cost=0.28..9.24 rows=1 width=0) (actual time=0.003..0.003 rows=1 loops=728)

  • Index Cond: (request_id = r.id)
  • Filter: (id > rsi.id)
  • Rows Removed by Filter: 7
51. 0.007 0.160 ↑ 1.0 36 1

Hash (cost=8.59..8.59 rows=36 width=42) (actual time=0.160..0.160 rows=36 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
52. 0.057 0.153 ↑ 1.0 36 1

Hash Left Join (cost=3.37..8.59 rows=36 width=42) (actual time=0.118..0.153 rows=36 loops=1)

  • Hash Cond: (fee_territory_cur.currency_id = fee_cur.id)
53. 0.026 0.076 ↑ 1.0 36 1

Hash Right Join (cost=1.81..6.92 rows=36 width=34) (actual time=0.045..0.076 rows=36 loops=1)

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

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

55. 0.011 0.026 ↑ 1.0 36 1

Hash (cost=1.36..1.36 rows=36 width=34) (actual time=0.026..0.026 rows=36 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
56. 0.015 0.015 ↑ 1.0 36 1

Seq Scan on project_request_fee prf (cost=0.00..1.36 rows=36 width=34) (actual time=0.011..0.015 rows=36 loops=1)

57. 0.009 0.020 ↑ 1.0 25 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
58. 0.011 0.011 ↑ 1.0 25 1

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

59. 0.033 0.059 ↑ 1.0 200 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 16kB
60. 0.026 0.026 ↑ 1.0 200 1

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

61. 4.017 4.017 ↑ 1.0 1 1,339

Index Scan using recording_pkey on recording rec (cost=0.43..8.41 rows=1 width=101) (actual time=0.003..0.003 rows=1 loops=1,339)

  • Index Cond: (r.recording_id = id)
62. 0.310 0.869 ↑ 1.0 1,323 1

Hash (cost=54.22..54.22 rows=1,323 width=46) (actual time=0.869..0.869 rows=1,323 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 82kB
63. 0.559 0.559 ↑ 1.0 1,323 1

Seq Scan on project_initial_right pir (cost=0.00..54.22 rows=1,323 width=46) (actual time=0.017..0.559 rows=1,323 loops=1)

  • Filter: (parent_project_initial_right_id IS NULL)
  • Rows Removed by Filter: 599
64.          

SubPlan (for Hash Left Join)

65. 7.764 15.528 ↑ 1.0 1 3,882

Bitmap Heap Scan on project_initial_right pir2_7 (cost=4.30..13.71 rows=1 width=0) (actual time=0.004..0.004 rows=1 loops=3,882)

  • Recheck Cond: (project_id = r.project_id)
  • Filter: (id < pir.id)
  • Rows Removed by Filter: 2
  • Heap Blocks: exact=7,085
66. 7.764 7.764 ↓ 3.3 10 3,882

Bitmap Index Scan on project_initial_right_project_id_index (cost=0.00..4.30 rows=3 width=0) (actual time=0.002..0.002 rows=10 loops=3,882)

  • Index Cond: (project_id = r.project_id)
67. 10.712 16.068 ↑ 1.0 1 1,339

Aggregate (cost=10.47..10.48 rows=1 width=1) (actual time=0.012..0.012 rows=1 loops=1,339)

68. 2.678 5.356 ↓ 1.5 3 1,339

Bitmap Heap Scan on project_request rr (cost=4.29..10.47 rows=2 width=8) (actual time=0.003..0.004 rows=3 loops=1,339)

  • Recheck Cond: (project_id = r.project_id)
  • Heap Blocks: exact=2,536
69. 2.678 2.678 ↓ 1.5 3 1,339

Bitmap Index Scan on request_project_index (cost=0.00..4.29 rows=2 width=0) (actual time=0.002..0.002 rows=3 loops=1,339)

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

SubPlan (for Nested Loop Left Join)

71. 2.678 2.678 ↓ 0.0 0 1,339

Seq Scan on right_request_fee (cost=0.00..1.09 rows=1 width=18) (actual time=0.002..0.002 rows=0 loops=1,339)

  • Filter: ((request_id = r.id) AND (parent_right_id = pir.id))
  • Rows Removed by Filter: 9
72. 9.373 10.712 ↑ 1.0 1 1,339

Aggregate (cost=1.08..1.09 rows=1 width=32) (actual time=0.008..0.008 rows=1 loops=1,339)

73. 1.339 1.339 ↓ 0.0 0 1,339

Seq Scan on right_request_fee right_request_fee_1 (cost=0.00..1.08 rows=1 width=18) (actual time=0.001..0.001 rows=0 loops=1,339)

  • Filter: (request_id = r.id)
  • Rows Removed by Filter: 9
74. 0.375 0.375 ↑ 1.0 1 75

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

  • Index Cond: (id = rec.label_id)
75. 0.150 1.125 ↑ 1.0 1 75

Aggregate (cost=16.90..16.91 rows=1 width=32) (actual time=0.015..0.015 rows=1 loops=75)

76. 0.075 0.975 ↑ 1.0 1 75

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

77. 0.525 0.525 ↑ 1.0 1 75

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

  • Index Cond: (recording_id = rec.id)
78. 0.375 0.375 ↑ 1.0 1 75

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

  • Index Cond: (id = ra.artist_id)
79. 0.075 1.050 ↑ 1.0 1 75

Aggregate (cost=28.57..28.58 rows=1 width=32) (actual time=0.014..0.014 rows=1 loops=75)

80. 0.651 0.975 ↓ 0.0 0 75

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

81. 0.075 0.300 ↓ 0.0 0 75

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

  • Recheck Cond: (recording_id = rec.id)
  • Heap Blocks: exact=4
82. 0.225 0.225 ↓ 0.0 0 75

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

  • Index Cond: (recording_id = rec.id)
83. 0.024 0.024 ↑ 1.0 1 4

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

  • Index Cond: (id = rw.writer_id)
84. 0.000 6.695 ↓ 0.0 0 1,339

Nested Loop Semi Join (cost=1.39..17.93 rows=1 width=0) (actual time=0.005..0.005 rows=0 loops=1,339)

85. 6.695 6.695 ↓ 0.0 0 1,339

Index Scan using license_status_index on project_license pl (cost=0.28..8.29 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=1,339)

  • Index Cond: ((status)::text = 'SENT'::text)
  • Filter: (project_id = r.project_id)
  • Rows Removed by Filter: 1
86. 0.002 0.038 ↑ 1.0 1 2

Nested Loop Left Join (cost=1.11..9.63 rows=1 width=8) (actual time=0.019..0.019 rows=1 loops=2)

  • 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
87. 0.004 0.020 ↑ 1.0 1 2

Nested Loop (cost=0.56..8.67 rows=1 width=17) (actual time=0.010..0.010 rows=1 loops=2)

88. 0.010 0.010 ↑ 1.0 1 2

Index Scan using project_initial_right_project_license_id_index on project_initial_right pir_ru (cost=0.28..8.29 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=2)

  • Index Cond: (project_license_id = pl.id)
89. 0.006 0.006 ↑ 1.0 1 2

Index Scan using right_use_recording_id_index on right_use ru (cost=0.28..0.37 rows=1 width=17) (actual time=0.003..0.003 rows=1 loops=2)

  • Index Cond: (project_initial_right_id = pir_ru.id)
90. 0.002 0.016 ↑ 1.0 1 2

Nested Loop Semi Join (cost=0.56..0.95 rows=1 width=17) (actual time=0.008..0.008 rows=1 loops=2)

91. 0.008 0.008 ↑ 1.0 1 2

Index Scan using override_source_right_use_id_index on right_use ru_ov (cost=0.28..0.36 rows=1 width=25) (actual time=0.004..0.004 rows=1 loops=2)

  • Index Cond: (override_source_right_use_id = ru.id)
92. 0.006 0.006 ↑ 1.0 1 2

Index Scan using project_initial_right_pkey on project_initial_right pir2 (cost=0.28..0.43 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=2)

  • Index Cond: (id = ru_ov.project_initial_right_id)
  • Filter: (override_request_id = r.id)
  • Rows Removed by Filter: 1
93. 1.157 5.356 ↓ 0.0 0 1,339

Nested Loop Semi Join (cost=1.39..17.93 rows=1 width=0) (actual time=0.004..0.004 rows=0 loops=1,339)

94. 4.017 4.017 ↓ 0.0 0 1,339

Index Scan using license_status_index on project_license pl_1 (cost=0.28..8.29 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=1,339)

  • Index Cond: ((status)::text = 'PARTIALLY_EXECUTED'::text)
  • Filter: (project_id = r.project_id)
  • Rows Removed by Filter: 1
95. 0.003 0.182 ↑ 1.0 1 7

Nested Loop Left Join (cost=1.11..9.63 rows=1 width=8) (actual time=0.026..0.026 rows=1 loops=7)

  • 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: 2
96. 0.001 0.035 ↓ 2.0 2 7

Nested Loop (cost=0.56..8.67 rows=1 width=17) (actual time=0.004..0.005 rows=2 loops=7)

97. 0.014 0.014 ↑ 1.0 1 7

Index Scan using project_initial_right_project_license_id_index on project_initial_right pir_ru_1 (cost=0.28..8.29 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=7)

  • Index Cond: (project_license_id = pl_1.id)
98. 0.020 0.020 ↓ 2.0 2 10

Index Scan using right_use_recording_id_index on right_use ru_1 (cost=0.28..0.37 rows=1 width=17) (actual time=0.001..0.002 rows=2 loops=10)

  • Index Cond: (project_initial_right_id = pir_ru_1.id)
99. 0.021 0.144 ↓ 0.0 0 16

Nested Loop Semi Join (cost=0.56..0.95 rows=1 width=17) (actual time=0.008..0.009 rows=0 loops=16)

100. 0.096 0.096 ↓ 2.0 2 16

Index Scan using override_source_right_use_id_index on right_use ru_ov_1 (cost=0.28..0.36 rows=1 width=25) (actual time=0.005..0.006 rows=2 loops=16)

  • Index Cond: (override_source_right_use_id = ru_1.id)
101. 0.027 0.027 ↓ 0.0 0 27

Index Scan using project_initial_right_pkey on project_initial_right pir2_1 (cost=0.28..0.43 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=27)

  • Index Cond: (id = ru_ov_1.project_initial_right_id)
  • Filter: (override_request_id = r.id)
  • Rows Removed by Filter: 1
102. 1.255 5.356 ↓ 0.0 0 1,339

Nested Loop Semi Join (cost=1.39..17.93 rows=1 width=0) (actual time=0.004..0.004 rows=0 loops=1,339)

103. 4.017 4.017 ↓ 0.0 0 1,339

Index Scan using license_status_index on project_license pl_2 (cost=0.28..8.29 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=1,339)

  • Index Cond: ((status)::text = 'FULLY_EXECUTED'::text)
  • Filter: (project_id = r.project_id)
  • Rows Removed by Filter: 1
104. 0.006 0.084 ↑ 1.0 1 7

Nested Loop Left Join (cost=1.11..9.63 rows=1 width=8) (actual time=0.012..0.012 rows=1 loops=7)

  • 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))
  • Rows Removed by Filter: 0
105. 0.014 0.028 ↑ 1.0 1 7

Nested Loop (cost=0.56..8.67 rows=1 width=17) (actual time=0.004..0.004 rows=1 loops=7)

106. 0.007 0.007 ↑ 1.0 1 7

Index Scan using project_initial_right_project_license_id_index on project_initial_right pir_ru_2 (cost=0.28..8.29 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=7)

  • Index Cond: (project_license_id = pl_2.id)
107. 0.007 0.007 ↑ 1.0 1 7

Index Scan using right_use_recording_id_index on right_use ru_2 (cost=0.28..0.37 rows=1 width=17) (actual time=0.001..0.001 rows=1 loops=7)

  • Index Cond: (project_initial_right_id = pir_ru_2.id)
108. 0.014 0.050 ↑ 1.0 1 10

Nested Loop Semi Join (cost=0.56..0.95 rows=1 width=17) (actual time=0.005..0.005 rows=1 loops=10)

109. 0.010 0.010 ↓ 3.0 3 10

Index Scan using override_source_right_use_id_index on right_use ru_ov_2 (cost=0.28..0.36 rows=1 width=25) (actual time=0.001..0.001 rows=3 loops=10)

  • Index Cond: (override_source_right_use_id = ru_2.id)
110. 0.026 0.026 ↓ 0.0 0 26

Index Scan using project_initial_right_pkey on project_initial_right pir2_2 (cost=0.28..0.43 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=26)

  • Index Cond: (id = ru_ov_2.project_initial_right_id)
  • Filter: (override_request_id = r.id)
  • Rows Removed by Filter: 1
111. 22.064 195.494 ↑ 1.0 1 1,339

Hash Left Join (cost=21.47..90.67 rows=1 width=0) (actual time=0.146..0.146 rows=1 loops=1,339)

  • Hash Cond: (ru_3.id = ru_ov_3.override_source_right_use_id)
  • 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: 1
112. 1.339 21.424 ↑ 1.5 2 1,339

Nested Loop Left Join (cost=4.86..63.52 rows=3 width=25) (actual time=0.014..0.016 rows=2 loops=1,339)

113. 10.577 20.085 ↑ 1.5 2 1,339

Nested Loop (cost=4.58..38.63 rows=3 width=25) (actual time=0.013..0.015 rows=2 loops=1,339)

114. 2.678 5.356 ↑ 1.5 2 1,339

Bitmap Heap Scan on project_initial_right pir_ru_3 (cost=4.30..13.71 rows=3 width=24) (actual time=0.003..0.004 rows=2 loops=1,339)

  • Recheck 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: 1
  • Heap Blocks: exact=1,806
115. 2.678 2.678 ↓ 1.3 4 1,339

Bitmap Index Scan on project_initial_right_project_id_index (cost=0.00..4.30 rows=3 width=0) (actual time=0.002..0.002 rows=4 loops=1,339)

  • Index Cond: (project_id = r.project_id)
116. 4.152 4.152 ↑ 1.0 1 2,076

Index Scan using right_use_recording_id_index on right_use ru_3 (cost=0.28..8.29 rows=1 width=17) (actual time=0.001..0.002 rows=1 loops=2,076)

  • Index Cond: (project_initial_right_id = pir_ru_3.id)
117. 0.000 0.000 ↓ 0.0 0 2,372

Index Scan using project_initial_right_pkey on project_initial_right pir_ru_parent (cost=0.28..8.29 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=2,372)

  • Index Cond: (pir_ru_3.override_source_right_id = id)
118. 0.000 2.570 ↓ 0.0 0 1,285

Hash (cost=16.60..16.60 rows=1 width=17) (actual time=0.002..0.002 rows=0 loops=1,285)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
119. 0.979 2.570 ↓ 0.0 0 1,285

Nested Loop (cost=0.56..16.60 rows=1 width=17) (actual time=0.002..0.002 rows=0 loops=1,285)

120. 1.285 1.285 ↓ 0.0 0 1,285

Index Scan using project_initial_right_override_request_id_index on project_initial_right pir2_3 (cost=0.28..8.29 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1,285)

  • Index Cond: (override_request_id = r.id)
121. 0.306 0.306 ↑ 1.0 1 153

Index Scan using right_use_recording_id_index on right_use ru_ov_3 (cost=0.28..8.29 rows=1 width=25) (actual time=0.001..0.002 rows=1 loops=153)

  • Index Cond: (project_initial_right_id = pir2_3.id)
122.          

SubPlan (for Hash Left Join)

123. 149.436 149.436 ↓ 0.0 0 2,372

Seq Scan on project_invoice_license pil (cost=0.00..21.03 rows=2 width=0) (actual time=0.063..0.063 rows=0 loops=2,372)

  • Filter: ((license_id = pir_ru_3.project_license_id) OR (license_id = pir_ru_parent.project_license_id))
  • Rows Removed by Filter: 690
124. 4.201 48.204 ↑ 1.0 1 1,339

Hash Left Join (cost=21.47..109.90 rows=1 width=0) (actual time=0.036..0.036 rows=1 loops=1,339)

  • 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: 1
125. 1.339 20.085 ↑ 1.5 2 1,339

Nested Loop Left Join (cost=4.86..63.52 rows=3 width=25) (actual time=0.013..0.015 rows=2 loops=1,339)

126. 11.314 18.746 ↑ 1.5 2 1,339

Nested Loop (cost=4.58..38.63 rows=3 width=25) (actual time=0.012..0.014 rows=2 loops=1,339)

127. 2.678 5.356 ↑ 1.5 2 1,339

Bitmap Heap Scan on project_initial_right pir_ru_4 (cost=4.30..13.71 rows=3 width=24) (actual time=0.003..0.004 rows=2 loops=1,339)

  • Recheck 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: 1
  • Heap Blocks: exact=1,806
128. 2.678 2.678 ↓ 1.3 4 1,339

Bitmap Index Scan on project_initial_right_project_id_index (cost=0.00..4.30 rows=3 width=0) (actual time=0.002..0.002 rows=4 loops=1,339)

  • Index Cond: (project_id = r.project_id)
129. 2.076 2.076 ↑ 1.0 1 2,076

Index Scan using right_use_recording_id_index on right_use ru_4 (cost=0.28..8.29 rows=1 width=17) (actual time=0.001..0.001 rows=1 loops=2,076)

  • Index Cond: (project_initial_right_id = pir_ru_4.id)
130. 0.000 0.000 ↓ 0.0 0 2,372

Index Scan using project_initial_right_pkey on project_initial_right pir_ru_parent_1 (cost=0.28..8.29 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=2,372)

  • Index Cond: (pir_ru_4.override_source_right_id = id)
131. 1.285 2.570 ↓ 0.0 0 1,285

Hash (cost=16.60..16.60 rows=1 width=17) (actual time=0.002..0.002 rows=0 loops=1,285)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
132. 0.000 1.285 ↓ 0.0 0 1,285

Nested Loop (cost=0.56..16.60 rows=1 width=17) (actual time=0.001..0.001 rows=0 loops=1,285)

133. 1.285 1.285 ↓ 0.0 0 1,285

Index Scan using project_initial_right_override_request_id_index on project_initial_right pir2_4 (cost=0.28..8.29 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1,285)

  • Index Cond: (override_request_id = r.id)
134. 0.153 0.153 ↑ 1.0 1 153

Index Scan using right_use_recording_id_index on right_use ru_ov_4 (cost=0.28..8.29 rows=1 width=25) (actual time=0.001..0.001 rows=1 loops=153)

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

SubPlan (for Hash Left Join)

136. 16.966 21.348 ↓ 0.0 0 2,372

Nested Loop (cost=8.84..29.75 rows=1 width=0) (actual time=0.009..0.009 rows=0 loops=2,372)

137. 0.000 2.372 ↓ 0.0 0 2,372

Bitmap Heap Scan on project_invoice_license pil_1 (cost=8.57..13.13 rows=2 width=16) (actual time=0.001..0.001 rows=0 loops=2,372)

  • Recheck Cond: ((license_id = pir_ru_4.project_license_id) OR (license_id = pir_ru_parent_1.project_license_id))
  • Heap Blocks: exact=1,005
138. 0.000 2.372 ↓ 0.0 0 2,372

BitmapOr (cost=8.57..8.57 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=2,372)

139. 2.372 2.372 ↓ 0.0 0 2,372

Bitmap Index Scan on project_invoice_license_license_id_index (cost=0.00..4.28 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=2,372)

  • Index Cond: (license_id = pir_ru_4.project_license_id)
140. 0.000 0.000 ↓ 0.0 0 2,372

Bitmap Index Scan on project_invoice_license_license_id_index (cost=0.00..4.28 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=2,372)

  • Index Cond: (license_id = pir_ru_parent_1.project_license_id)
141. 2.010 2.010 ↑ 1.0 1 1,005

Index Scan using project_invoice_pkey on project_invoice inv (cost=0.28..8.30 rows=1 width=14) (actual time=0.002..0.002 rows=1 loops=1,005)

  • 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[]))))
142. 4.201 48.204 ↑ 1.0 1 1,339

Hash Left Join (cost=21.47..109.91 rows=1 width=0) (actual time=0.036..0.036 rows=1 loops=1,339)

  • 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: 1
143. 1.339 20.085 ↑ 1.5 2 1,339

Nested Loop Left Join (cost=4.86..63.52 rows=3 width=25) (actual time=0.013..0.015 rows=2 loops=1,339)

144. 12.653 18.746 ↑ 1.5 2 1,339

Nested Loop (cost=4.58..38.63 rows=3 width=25) (actual time=0.012..0.014 rows=2 loops=1,339)

145. 1.339 4.017 ↑ 1.5 2 1,339

Bitmap Heap Scan on project_initial_right pir_ru_5 (cost=4.30..13.71 rows=3 width=24) (actual time=0.003..0.003 rows=2 loops=1,339)

  • Recheck 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: 1
  • Heap Blocks: exact=1,806
146. 2.678 2.678 ↓ 1.3 4 1,339

Bitmap Index Scan on project_initial_right_project_id_index (cost=0.00..4.30 rows=3 width=0) (actual time=0.002..0.002 rows=4 loops=1,339)

  • Index Cond: (project_id = r.project_id)
147. 2.076 2.076 ↑ 1.0 1 2,076

Index Scan using right_use_recording_id_index on right_use ru_5 (cost=0.28..8.29 rows=1 width=17) (actual time=0.001..0.001 rows=1 loops=2,076)

  • Index Cond: (project_initial_right_id = pir_ru_5.id)
148. 0.000 0.000 ↓ 0.0 0 2,372

Index Scan using project_initial_right_pkey on project_initial_right pir_ru_parent_2 (cost=0.28..8.29 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=2,372)

  • Index Cond: (pir_ru_5.override_source_right_id = id)
149. 1.285 2.570 ↓ 0.0 0 1,285

Hash (cost=16.60..16.60 rows=1 width=17) (actual time=0.002..0.002 rows=0 loops=1,285)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
150. 0.000 1.285 ↓ 0.0 0 1,285

Nested Loop (cost=0.56..16.60 rows=1 width=17) (actual time=0.001..0.001 rows=0 loops=1,285)

151. 1.285 1.285 ↓ 0.0 0 1,285

Index Scan using project_initial_right_override_request_id_index on project_initial_right pir2_5 (cost=0.28..8.29 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1,285)

  • Index Cond: (override_request_id = r.id)
152. 0.153 0.153 ↑ 1.0 1 153

Index Scan using right_use_recording_id_index on right_use ru_ov_5 (cost=0.28..8.29 rows=1 width=25) (actual time=0.001..0.001 rows=1 loops=153)

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

SubPlan (for Hash Left Join)

154. 17.971 21.348 ↓ 0.0 0 2,372

Nested Loop (cost=8.84..29.76 rows=1 width=0) (actual time=0.009..0.009 rows=0 loops=2,372)

155. 0.000 2.372 ↓ 0.0 0 2,372

Bitmap Heap Scan on project_invoice_license pil_2 (cost=8.57..13.13 rows=2 width=16) (actual time=0.001..0.001 rows=0 loops=2,372)

  • Recheck Cond: ((license_id = pir_ru_5.project_license_id) OR (license_id = pir_ru_parent_2.project_license_id))
  • Heap Blocks: exact=1,005
156. 0.000 2.372 ↓ 0.0 0 2,372

BitmapOr (cost=8.57..8.57 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=2,372)

157. 2.372 2.372 ↓ 0.0 0 2,372

Bitmap Index Scan on project_invoice_license_license_id_index (cost=0.00..4.28 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=2,372)

  • Index Cond: (license_id = pir_ru_5.project_license_id)
158. 0.000 0.000 ↓ 0.0 0 2,372

Bitmap Index Scan on project_invoice_license_license_id_index (cost=0.00..4.28 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=2,372)

  • Index Cond: (license_id = pir_ru_parent_2.project_license_id)
159. 1.005 1.005 ↑ 1.0 1 1,005

Index Scan using project_invoice_pkey on project_invoice inv_1 (cost=0.28..8.30 rows=1 width=14) (actual time=0.001..0.001 rows=1 loops=1,005)

  • 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[]))))
160. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (override_request_id = r.id)
  • Filter: (exclusivity_id IS NOT NULL)
161. 0.217 0.217 ↑ 1.0 30 1

Seq Scan on project_initial_right project_initial_right_1 (cost=0.00..54.22 rows=30 width=8) (actual time=0.009..0.217 rows=30 loops=1)

  • Filter: (exclusivity_id IS NOT NULL)
  • Rows Removed by Filter: 1,892
162. 20.419 190.138 ↑ 1.0 1 1,339

Hash Left Join (cost=21.47..90.67 rows=1 width=0) (actual time=0.142..0.142 rows=1 loops=1,339)

  • Hash Cond: (ru_6.id = ru_ov_6.override_source_right_use_id)
  • 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: 1
163. 1.339 20.085 ↑ 1.5 2 1,339

Nested Loop Left Join (cost=4.86..63.52 rows=3 width=25) (actual time=0.012..0.015 rows=2 loops=1,339)

164. 11.314 18.746 ↑ 1.5 2 1,339

Nested Loop (cost=4.58..38.63 rows=3 width=25) (actual time=0.012..0.014 rows=2 loops=1,339)

165. 2.678 5.356 ↑ 1.5 2 1,339

Bitmap Heap Scan on project_initial_right pir_ru_6 (cost=4.30..13.71 rows=3 width=24) (actual time=0.003..0.004 rows=2 loops=1,339)

  • Recheck 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: 1
  • Heap Blocks: exact=1,806
166. 2.678 2.678 ↓ 1.3 4 1,339

Bitmap Index Scan on project_initial_right_project_id_index (cost=0.00..4.30 rows=3 width=0) (actual time=0.002..0.002 rows=4 loops=1,339)

  • Index Cond: (project_id = r.project_id)
167. 2.076 2.076 ↑ 1.0 1 2,076

Index Scan using right_use_recording_id_index on right_use ru_6 (cost=0.28..8.29 rows=1 width=17) (actual time=0.001..0.001 rows=1 loops=2,076)

  • Index Cond: (project_initial_right_id = pir_ru_6.id)
168. 0.000 0.000 ↓ 0.0 0 2,372

Index Scan using project_initial_right_pkey on project_initial_right pir_ru_parent_3 (cost=0.28..8.29 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=2,372)

  • Index Cond: (pir_ru_6.override_source_right_id = id)
169. 1.285 2.570 ↓ 0.0 0 1,285

Hash (cost=16.60..16.60 rows=1 width=17) (actual time=0.002..0.002 rows=0 loops=1,285)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
170. 0.000 1.285 ↓ 0.0 0 1,285

Nested Loop (cost=0.56..16.60 rows=1 width=17) (actual time=0.001..0.001 rows=0 loops=1,285)

171. 1.285 1.285 ↓ 0.0 0 1,285

Index Scan using project_initial_right_override_request_id_index on project_initial_right pir2_6 (cost=0.28..8.29 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1,285)

  • Index Cond: (override_request_id = r.id)
172. 0.153 0.153 ↑ 1.0 1 153

Index Scan using right_use_recording_id_index on right_use ru_ov_6 (cost=0.28..8.29 rows=1 width=25) (actual time=0.001..0.001 rows=1 loops=153)

  • Index Cond: (project_initial_right_id = pir2_6.id)
173.          

SubPlan (for Hash Left Join)

174. 147.064 147.064 ↓ 0.0 0 2,372

Seq Scan on project_invoice_license pil_3 (cost=0.00..21.03 rows=2 width=0) (actual time=0.062..0.062 rows=0 loops=2,372)

  • Filter: ((license_id = pir_ru_6.project_license_id) OR (license_id = pir_ru_parent_3.project_license_id))
  • Rows Removed by Filter: 690
175. 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.28..8.29 rows=1 width=0) (never executed)

  • Index Cond: (override_request_id = r.id)
  • Filter: (royalty_bearing_id IS NOT NULL)
176. 0.203 0.203 ↑ 1.0 16 1

Seq Scan on project_initial_right project_initial_right_3 (cost=0.00..54.22 rows=16 width=8) (actual time=0.011..0.203 rows=16 loops=1)

  • Filter: (royalty_bearing_id IS NOT NULL)
  • Rows Removed by Filter: 1,906