explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Yesw : original query on 9.4

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 18,691.293 ↑ 303.0 33 1

Limit (cost=849,047.40..849,072.40 rows=10,000 width=648) (actual time=18,691.287..18,691.293 rows=33 loops=1)

2. 0.138 18,691.285 ↑ 7,041.6 33 1

Sort (cost=849,047.40..849,628.33 rows=232,372 width=648) (actual time=18,691.284..18,691.285 rows=33 loops=1)

  • Sort Key: (CASE WHEN (hashed SubPlan 1) THEN 0 ELSE 1 END), (COALESCE(s.ww_cume_rev, (-1)::numeric)), (COALESCE(s.domestic_release_date, '1901-01-01'::date))
  • Sort Method: quicksort Memory: 37kB
3. 0.038 18,691.147 ↑ 7,041.6 33 1

Subquery Scan on s (cost=827,218.71..832,447.08 rows=232,372 width=648) (actual time=18,690.607..18,691.147 rows=33 loops=1)

4. 10.539 18,196.552 ↑ 7,041.6 33 1

HashAggregate (cost=774,121.21..776,444.93 rows=232,372 width=656) (actual time=18,196.026..18,196.552 rows=33 loops=1)

  • Group Key: rs_releases_summary.title_no, ti_titles.title_no
5.          

CTE ww_cumes

6. 2,089.429 4,828.436 ↑ 1.0 97,016 1

GroupAggregate (cost=202,904.97..300,281.17 rows=97,781 width=67) (actual time=2,691.736..4,828.436 rows=97,016 loops=1)

  • Group Key: t_2.title_no
7. 204.943 2,739.007 ↓ 2.7 465,548 1

Sort (cost=202,904.97..203,332.86 rows=171,158 width=67) (actual time=2,691.514..2,739.007 rows=465,548 loops=1)

  • Sort Key: t_2.title_no
  • Sort Method: quicksort Memory: 72941kB
8. 177.177 2,534.064 ↓ 2.7 465,548 1

Hash Join (cost=178,816.03..188,027.09 rows=171,158 width=67) (actual time=2,191.202..2,534.064 rows=465,548 loops=1)

  • Hash Cond: (s_1.title_no = t_2.title_no)
9. 165.695 2,315.766 ↓ 2.7 465,548 1

Hash Right Join (cost=172,066.95..177,854.85 rows=171,158 width=63) (actual time=2,150.011..2,315.766 rows=465,548 loops=1)

  • Hash Cond: ((subscription_countries.country_id)::text = (s_1.country_id)::text)
10. 0.150 0.218 ↓ 1.1 110 1

Bitmap Heap Scan on subscription_countries (cost=5.14..190.34 rows=96 width=3) (actual time=0.088..0.218 rows=110 loops=1)

  • Recheck Cond: (subscription_no = 11279)
  • Filter: can_access_srg
  • Heap Blocks: exact=8
11. 0.068 0.068 ↑ 1.0 110 1

Bitmap Index Scan on subscription_countries_pkey (cost=0.00..5.12 rows=111 width=0) (actual time=0.068..0.068 rows=110 loops=1)

  • Index Cond: (subscription_no = 11279)
12. 895.502 2,149.853 ↓ 3.1 465,548 1

Hash (cost=170,174.88..170,174.88 rows=150,954 width=60) (actual time=2,149.853..2,149.853 rows=465,548 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 39586kB
13. 58.723 1,254.351 ↓ 3.1 465,548 1

Merge Right Join (cost=164,900.68..170,174.88 rows=150,954 width=60) (actual time=926.060..1,254.351 rows=465,548 loops=1)

  • Merge Cond: (to_ex.day = s_1.earliest_release_date_of_title)
14. 4.553 11.823 ↑ 1.0 17,372 1

Sort (cost=14,293.54..14,338.40 rows=17,942 width=18) (actual time=10.801..11.823 rows=17,372 loops=1)

  • Sort Key: to_ex.day
  • Sort Method: quicksort Memory: 1583kB
15. 5.583 7.270 ↑ 1.0 17,372 1

Bitmap Heap Scan on exchange_rates_by_day to_ex (cost=663.48..13,025.85 rows=17,942 width=18) (actual time=1.822..7.270 rows=17,372 loops=1)

  • Recheck Cond: (currency_type_no = 1)
  • Heap Blocks: exact=1347
16. 1.687 1.687 ↑ 1.0 17,372 1

Bitmap Index Scan on exchange_rates_by_day_pkey (cost=0.00..658.99 rows=17,942 width=0) (actual time=1.687..1.687 rows=17,372 loops=1)

  • Index Cond: (currency_type_no = 1)
17. 80.506 1,183.805 ↓ 3.1 465,548 1

Materialize (cost=150,607.14..153,944.27 rows=150,954 width=54) (actual time=915.254..1,183.805 rows=465,548 loops=1)

18. 126.812 1,103.299 ↓ 3.1 465,548 1

Merge Left Join (cost=150,607.14..153,566.88 rows=150,954 width=54) (actual time=915.251..1,103.299 rows=465,548 loops=1)

  • Merge Cond: (s_1.earliest_release_date_of_title = from_ex.day)
19. 172.690 952.605 ↓ 3.1 465,548 1

Sort (cost=136,313.60..136,690.98 rows=150,954 width=44) (actual time=907.763..952.605 rows=465,548 loops=1)

  • Sort Key: s_1.earliest_release_date_of_title
  • Sort Method: quicksort Memory: 63892kB
20. 87.070 779.915 ↓ 3.1 465,548 1

Merge Right Join (cost=121,150.20..123,328.72 rows=150,954 width=44) (actual time=640.640..779.915 rows=465,548 loops=1)

  • Merge Cond: (ex.day = s_1.exchange_rate_date)
21. 4.484 7.870 ↑ 1.0 17,372 1

Sort (cost=14,293.54..14,338.40 rows=17,942 width=18) (actual time=6.768..7.870 rows=17,372 loops=1)

  • Sort Key: ex.day
  • Sort Method: quicksort Memory: 1583kB
22. 2.518 3.386 ↑ 1.0 17,372 1

Bitmap Heap Scan on exchange_rates_by_day ex (cost=663.48..13,025.85 rows=17,942 width=18) (actual time=0.992..3.386 rows=17,372 loops=1)

  • Recheck Cond: (currency_type_no = 1)
  • Heap Blocks: exact=1347
23. 0.868 0.868 ↑ 1.0 17,372 1

Bitmap Index Scan on exchange_rates_by_day_pkey (cost=0.00..658.99 rows=17,942 width=0) (actual time=0.868..0.868 rows=17,372 loops=1)

  • Index Cond: (currency_type_no = 1)
24. 179.363 684.975 ↓ 3.1 465,548 1

Sort (cost=106,856.66..107,234.04 rows=150,954 width=34) (actual time=633.863..684.975 rows=465,548 loops=1)

  • Sort Key: s_1.exchange_rate_date
  • Sort Method: quicksort Memory: 52555kB
25. 147.784 505.612 ↓ 3.1 465,548 1

Hash Join (cost=9.53..93,871.79 rows=150,954 width=34) (actual time=0.083..505.612 rows=465,548 loops=1)

  • Hash Cond: ((s_1.country_id)::text = (c_4.country_id)::text)
26. 357.763 357.763 ↓ 1.3 493,181 1

Seq Scan on rs_releases_summary s_1 (cost=0.00..90,892.40 rows=389,418 width=34) (actual time=0.011..357.763 rows=493,181 loops=1)

  • Filter: ((language_no IS NULL) AND ((language_format_id)::text = 'DEFAULT'::text) AND ((visual_format_id)::text = 'DEFAULT'::text))
  • Rows Removed by Filter: 247547
27. 0.018 0.065 ↓ 1.6 107 1

Hash (cost=8.67..8.67 rows=69 width=3) (actual time=0.065..0.065 rows=107 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
28. 0.047 0.047 ↓ 1.6 107 1

Seq Scan on ti_countries c_4 (cost=0.00..8.67 rows=69 width=3) (actual time=0.009..0.047 rows=107 loops=1)

  • Filter: (((is_supported)::text = 'Y'::text) AND ((is_reporting_srg)::text = 'Y'::text))
  • Rows Removed by Filter: 71
29. 19.588 23.882 ↓ 25.1 451,213 1

Sort (cost=14,293.54..14,338.40 rows=17,942 width=18) (actual time=7.479..23.882 rows=451,213 loops=1)

  • Sort Key: from_ex.day
  • Sort Method: quicksort Memory: 1583kB
30. 3.239 4.294 ↑ 1.0 17,372 1

Bitmap Heap Scan on exchange_rates_by_day from_ex (cost=663.48..13,025.85 rows=17,942 width=18) (actual time=1.178..4.294 rows=17,372 loops=1)

  • Recheck Cond: (currency_type_no = 1)
  • Heap Blocks: exact=1347
31. 1.055 1.055 ↑ 1.0 17,372 1

Bitmap Index Scan on exchange_rates_by_day_pkey (cost=0.00..658.99 rows=17,942 width=0) (actual time=1.055..1.055 rows=17,372 loops=1)

  • Index Cond: (currency_type_no = 1)
32. 14.404 41.121 ↑ 1.0 97,781 1

Hash (cost=5,526.81..5,526.81 rows=97,781 width=8) (actual time=41.121..41.121 rows=97,781 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 3788kB
33. 26.717 26.717 ↑ 1.0 97,781 1

Seq Scan on ti_titles t_2 (cost=0.00..5,526.81 rows=97,781 width=8) (actual time=0.010..26.717 rows=97,781 loops=1)

34. 7.551 18,186.013 ↑ 323.2 719 1

Hash Right Join (cost=417,166.95..456,412.13 rows=232,372 width=656) (actual time=18,154.006..18,186.013 rows=719 loops=1)

  • Hash Cond: (title_name_for_locale.title_no = ti_titles.title_no)
35. 30.338 38.076 ↑ 1.0 85,563 1

Bitmap Heap Scan on ti_releases title_name_for_locale (cost=1,622.37..38,164.92 rows=86,444 width=4) (actual time=10.940..38.076 rows=85,563 loops=1)

  • Recheck Cond: ((country_id)::text = 'US'::text)
  • Heap Blocks: exact=24486
36. 7.738 7.738 ↑ 1.0 85,584 1

Bitmap Index Scan on idx_ti_releases_countries (cost=0.00..1,600.75 rows=86,444 width=0) (actual time=7.738..7.738 rows=85,584 loops=1)

  • Index Cond: ((country_id)::text = 'US'::text)
37. 0.171 18,140.386 ↑ 976.4 238 1

Hash (cost=412,639.94..412,639.94 rows=232,372 width=656) (actual time=18,140.386..18,140.386 rows=238 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 81kB
38. 18.661 18,140.215 ↑ 976.4 238 1

Hash Right Join (cost=400,171.44..412,639.94 rows=232,372 width=656) (actual time=16,045.958..18,140.215 rows=238 loops=1)

  • Hash Cond: (ww_cumes.title_no = rs_releases_summary.title_no)
39. 4,866.281 4,866.281 ↑ 1.0 97,016 1

CTE Scan on ww_cumes (cost=0.00..1,955.62 rows=97,781 width=152) (actual time=2,691.742..4,866.281 rows=97,016 loops=1)

40. 0.181 13,255.273 ↑ 273.3 238 1

Hash (cost=399,358.36..399,358.36 rows=65,046 width=508) (actual time=13,255.273..13,255.273 rows=238 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 70kB
41. 25.980 13,255.092 ↑ 273.3 238 1

Hash Join (cost=378,478.14..399,358.36 rows=65,046 width=508) (actual time=12,884.671..13,255.092 rows=238 loops=1)

  • Hash Cond: (ti_titles.title_no = ti_keywords.title_no)
42. 333.227 11,862.952 ↓ 1.2 473,235 1

Hash Right Join (cost=311,603.72..331,015.08 rows=388,863 width=512) (actual time=11,496.735..11,862.952 rows=473,235 loops=1)

  • Hash Cond: (t.title_no = rs_releases_summary.title_no)
43. 86.951 278.097 ↑ 1.0 97,781 1

HashAggregate (cost=58,539.53..59,517.34 rows=97,781 width=26) (actual time=244.992..278.097 rows=97,781 loops=1)

  • Group Key: t.title_no
44. 20.940 191.146 ↓ 1.1 104,286 1

Hash Left Join (cost=24,745.70..33,605.38 rows=97,781 width=26) (actual time=123.994..191.146 rows=104,286 loops=1)

  • Hash Cond: (t.title_no = x.title_no)
45. 31.968 46.306 ↑ 1.0 97,781 1

Hash Left Join (cost=1.88..6,783.71 rows=97,781 width=15) (actual time=0.052..46.306 rows=97,781 loops=1)

  • Hash Cond: ((t.primary_genre_id)::text = (c.category_id)::text)
46. 14.320 14.320 ↑ 1.0 97,781 1

Seq Scan on ti_titles t (cost=0.00..5,526.81 rows=97,781 width=8) (actual time=0.006..14.320 rows=97,781 loops=1)

47. 0.009 0.018 ↑ 1.0 39 1

Hash (cost=1.39..1.39 rows=39 width=15) (actual time=0.018..0.018 rows=39 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
48. 0.009 0.009 ↑ 1.0 39 1

Seq Scan on ti_categories c (cost=0.00..1.39 rows=39 width=15) (actual time=0.004..0.009 rows=39 loops=1)

49. 5.037 123.900 ↑ 3.3 32,439 1

Hash (cost=23,394.51..23,394.51 rows=107,945 width=15) (actual time=123.900..123.900 rows=32,439 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 1442kB
50. 2.863 118.863 ↑ 3.3 32,439 1

Subquery Scan on x (cost=22,045.20..23,394.51 rows=107,945 width=15) (actual time=114.449..118.863 rows=32,439 loops=1)

51. 12.170 116.000 ↑ 3.3 32,439 1

Sort (cost=22,045.20..22,315.06 rows=107,945 width=15) (actual time=114.447..116.000 rows=32,439 loops=1)

  • Sort Key: t_1.title_no, c_1.description
  • Sort Method: quicksort Memory: 2370kB
52. 6.228 103.830 ↑ 3.3 32,439 1

Hash Join (cost=6,750.95..13,021.03 rows=107,945 width=15) (actual time=43.199..103.830 rows=32,439 loops=1)

  • Hash Cond: ((tc.category_id)::text = (c_1.category_id)::text)
53. 44.854 97.590 ↑ 3.3 32,439 1

Hash Join (cost=6,749.07..11,534.91 rows=107,945 width=8) (actual time=43.172..97.590 rows=32,439 loops=1)

  • Hash Cond: (tc.title_no = t_1.title_no)
  • Join Filter: ((tc.category_id)::text <> (t_1.primary_genre_id)::text)
  • Rows Removed by Join Filter: 95956
54. 9.616 9.616 ↑ 1.0 128,395 1

Seq Scan on ti_title_categories tc (cost=0.00..1,896.95 rows=128,395 width=8) (actual time=0.009..9.616 rows=128,395 loops=1)

55. 14.357 43.120 ↑ 1.0 97,781 1

Hash (cost=5,526.81..5,526.81 rows=97,781 width=8) (actual time=43.120..43.120 rows=97,781 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 3792kB
56. 28.763 28.763 ↑ 1.0 97,781 1

Seq Scan on ti_titles t_1 (cost=0.00..5,526.81 rows=97,781 width=8) (actual time=0.002..28.763 rows=97,781 loops=1)

57. 0.009 0.012 ↑ 1.0 39 1

Hash (cost=1.39..1.39 rows=39 width=15) (actual time=0.012..0.012 rows=39 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
58. 0.003 0.003 ↑ 1.0 39 1

Seq Scan on ti_categories c_1 (cost=0.00..1.39 rows=39 width=15) (actual time=0.001..0.003 rows=39 loops=1)

59. 1,925.426 11,251.628 ↓ 4.3 473,235 1

Hash (cost=251,703.55..251,703.55 rows=108,851 width=448) (actual time=11,251.628..11,251.628 rows=473,235 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 126773kB
60. 132.190 9,326.202 ↓ 4.3 473,235 1

Merge Left Join (cost=186,912.63..251,703.55 rows=108,851 width=448) (actual time=7,221.729..9,326.202 rows=473,235 loops=1)

  • Merge Cond: (ti_releases.title_no = primary_origin_countries.title_no)
61. 357.905 9,005.952 ↓ 10.2 473,235 1

Nested Loop (cost=147,005.04..210,047.13 rows=46,427 width=416) (actual time=7,062.827..9,005.952 rows=473,235 loops=1)

62. 120.801 7,228.342 ↓ 10.2 473,235 1

Merge Left Join (cost=147,004.61..147,535.67 rows=46,484 width=93) (actual time=7,062.773..7,228.342 rows=473,235 loops=1)

  • Merge Cond: (ti_releases.title_no = secondary_origin_countries.title_no)
63. 980.449 7,056.650 ↓ 10.2 473,235 1

Sort (cost=138,282.19..138,398.40 rows=46,484 width=61) (actual time=7,017.250..7,056.650 rows=473,235 loops=1)

  • Sort Key: ti_titles.title_no
  • Sort Method: quicksort Memory: 66774kB
64. 1,865.489 6,076.201 ↓ 10.2 473,235 1

Hash Right Join (cost=118,869.25..134,678.65 rows=46,484 width=61) (actual time=4,144.767..6,076.201 rows=473,235 loops=1)

  • Hash Cond: (release_window_summary.release_no = ti_releases.release_no)
65. 136.737 136.737 ↓ 4.0 741,210 1

Seq Scan on release_window_summary (cost=0.00..14,998.91 rows=185,191 width=8) (actual time=70.744..136.737 rows=741,210 loops=1)

66. 935.539 4,073.975 ↓ 10.2 473,235 1

Hash (cost=118,288.20..118,288.20 rows=46,484 width=57) (actual time=4,073.975..4,073.975 rows=473,235 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 39599kB
67. 188.680 3,138.436 ↓ 10.2 473,235 1

Hash Join (cost=19,824.75..118,288.20 rows=46,484 width=57) (actual time=2,071.160..3,138.436 rows=473,235 loops=1)

  • Hash Cond: (ti_releases.title_no = ti_titles.title_no)
68. 84.748 2,888.296 ↓ 10.0 476,070 1

Hash Join (cost=13,103.92..110,626.69 rows=47,583 width=14) (actual time=2,009.632..2,888.296 rows=476,070 loops=1)

  • Hash Cond: ((ti_releases.country_id)::text = (week_definitions_by_country.country_id)::text)
69. 798.679 859.383 ↓ 1.3 476,070 1

Bitmap Heap Scan on ti_releases (cost=13,019.94..108,176.54 rows=378,069 width=17) (actual time=65.445..859.383 rows=476,070 loops=1)

  • Recheck Cond: (((language_format_id)::text = 'DEFAULT'::text) AND (language_no IS NULL) AND ((visual_format_id)::text = 'DEFAULT'::text))
  • Filter: ((NOT is_alt_content) AND ((country_id)::text = ANY ('{AL,DZ,AR,AM,AA,AU,AT,AZ,BH,BD,BY,BE,BO,BA,BR,BG,KH,CA,CL,CN,CO,CR,HR,CU,CZ,DK,DO,EC,EG,SV,EE,ET,FI,FR,GE,DE,GH,GR,GT,HN,HK,HU,IS,IN,ID,IQ,IL,IT,JM,JP,JO,KZ,KE,KW,KG,LV,LB,LT,LU,MA,MY,MX,MD,MN,MZ,MM,NL,NZ,NI,NO,OM,PK,PA,PY,PE,PH,PL,PT,PR,QA,RO,RU,SA,RS,SG,SK,SI,ZA,KR,ES,SL,SR,SE,CH,SY,TW,TJ,TH,TT,TR,TM,UK,UP,AE,UY,US,UZ,VE,VN,WA}'::text[])))
  • Rows Removed by Filter: 17276
  • Heap Blocks: exact=35291
70. 60.704 60.704 ↓ 1.3 493,352 1

Bitmap Index Scan on idx_ti_releases_is_default_rel (cost=0.00..12,925.42 rows=391,440 width=0) (actual time=60.704..60.704 rows=493,352 loops=1)

  • Index Cond: (((language_format_id)::text = 'DEFAULT'::text) AND (language_no IS NULL) AND ((visual_format_id)::text = 'DEFAULT'::text))
71. 0.084 1,944.165 ↓ 8.3 141 1

Hash (cost=83.77..83.77 rows=17 width=3) (actual time=1,944.165..1,944.165 rows=141 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 5kB
72. 1,944.081 1,944.081 ↓ 8.3 141 1

Seq Scan on week_definitions_by_country (cost=0.00..83.77 rows=17 width=3) (actual time=1,926.875..1,944.081 rows=141 loops=1)

  • Filter: ((rtk_time.now() >= from_date) AND (rtk_time.now() <= to_date))
  • Rows Removed by Filter: 10
73. 19.170 61.460 ↑ 1.0 95,452 1

Hash (cost=5,526.81..5,526.81 rows=95,522 width=43) (actual time=61.460..61.460 rows=95,452 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 6967kB
74. 42.290 42.290 ↑ 1.0 95,452 1

Seq Scan on ti_titles (cost=0.00..5,526.81 rows=95,522 width=43) (actual time=0.017..42.290 rows=95,452 loops=1)

  • Filter: (NOT is_alt_content)
  • Rows Removed by Filter: 2329
75. 7.739 50.891 ↓ 6.5 78,415 1

Sort (cost=8,722.42..8,752.59 rows=12,067 width=36) (actual time=45.515..50.891 rows=78,415 loops=1)

  • Sort Key: secondary_origin_countries.title_no
  • Sort Method: quicksort Memory: 982kB
76. 0.773 43.152 ↑ 1.2 10,392 1

Subquery Scan on secondary_origin_countries (cost=7,663.01..7,904.35 rows=12,067 width=36) (actual time=40.928..43.152 rows=10,392 loops=1)

77. 14.485 42.379 ↑ 1.2 10,392 1

HashAggregate (cost=7,663.01..7,783.68 rows=12,067 width=150) (actual time=40.927..42.379 rows=10,392 loops=1)

  • Group Key: toc.title_no
78. 13.669 27.894 ↑ 1.0 15,569 1

Sort (cost=3,485.55..3,524.96 rows=15,764 width=20) (actual time=27.104..27.894 rows=15,569 loops=1)

  • Sort Key: (CASE WHEN (c_2.title_origin_description IS NOT NULL) THEN c_2.title_origin_description ELSE c_2.description END)
  • Sort Method: quicksort Memory: 1132kB
79. 3.027 14.225 ↑ 1.0 15,569 1

Hash Join (cost=10.01..2,386.46 rows=15,764 width=20) (actual time=0.137..14.225 rows=15,569 loops=1)

  • Hash Cond: ((toc.country_id)::text = (c_2.country_id)::text)
80. 11.094 11.094 ↑ 1.0 15,569 1

Seq Scan on title_origin_countries toc (cost=0.00..2,159.70 rows=15,764 width=7) (actual time=0.017..11.094 rows=15,569 loops=1)

  • Filter: ((is_primary)::text = 'N'::text)
  • Rows Removed by Filter: 86487
81. 0.030 0.104 ↑ 1.0 178 1

Hash (cost=7.78..7.78 rows=178 width=19) (actual time=0.104..0.104 rows=178 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
82. 0.074 0.074 ↑ 1.0 178 1

Seq Scan on ti_countries c_2 (cost=0.00..7.78 rows=178 width=19) (actual time=0.006..0.074 rows=178 loops=1)

83. 1,419.705 1,419.705 ↑ 1.0 1 473,235

Index Scan using pk_rs_releases_summary on rs_releases_summary (cost=0.42..1.33 rows=1 width=331) (actual time=0.003..0.003 rows=1 loops=473,235)

  • Index Cond: (release_no = ti_releases.release_no)
84. 48.514 188.060 ↓ 6.8 448,902 1

Sort (cost=39,907.59..40,072.73 rows=66,056 width=36) (actual time=158.890..188.060 rows=448,902 loops=1)

  • Sort Key: primary_origin_countries.title_no
  • Sort Method: quicksort Memory: 7179kB
85. 5.890 139.546 ↓ 1.3 85,819 1

Subquery Scan on primary_origin_countries (cost=33,298.22..34,619.34 rows=66,056 width=36) (actual time=121.760..139.546 rows=85,819 loops=1)

86. 34.693 133.656 ↓ 1.3 85,819 1

HashAggregate (cost=33,298.22..33,958.78 rows=66,056 width=150) (actual time=121.759..133.656 rows=85,819 loops=1)

  • Group Key: toc_1.title_no
87. 71.041 98.963 ↓ 1.0 86,487 1

Sort (cost=10,430.84..10,646.57 rows=86,292 width=20) (actual time=94.830..98.963 rows=86,487 loops=1)

  • Sort Key: (CASE WHEN (c_3.title_origin_description IS NOT NULL) THEN c_3.title_origin_description ELSE c_3.description END)
  • Sort Method: quicksort Memory: 7196kB
88. 16.653 27.922 ↓ 1.0 86,487 1

Hash Join (cost=10.01..3,356.22 rows=86,292 width=20) (actual time=0.092..27.922 rows=86,487 loops=1)

  • Hash Cond: ((toc_1.country_id)::text = (c_3.country_id)::text)
89. 11.189 11.189 ↓ 1.0 86,487 1

Seq Scan on title_origin_countries toc_1 (cost=0.00..2,159.70 rows=86,292 width=7) (actual time=0.006..11.189 rows=86,487 loops=1)

  • Filter: ((is_primary)::text = 'Y'::text)
  • Rows Removed by Filter: 15569
90. 0.032 0.080 ↑ 1.0 178 1

Hash (cost=7.78..7.78 rows=178 width=19) (actual time=0.080..0.080 rows=178 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
91. 0.048 0.048 ↑ 1.0 178 1

Seq Scan on ti_countries c_3 (cost=0.00..7.78 rows=178 width=19) (actual time=0.002..0.048 rows=178 loops=1)

92. 0.035 1,366.160 ↑ 8.1 33 1

Hash (cost=66,871.08..66,871.08 rows=267 width=4) (actual time=1,366.160..1,366.160 rows=33 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
93. 0.066 1,366.125 ↑ 8.1 33 1

HashAggregate (cost=66,868.41..66,871.08 rows=267 width=4) (actual time=1,366.121..1,366.125 rows=33 loops=1)

  • Group Key: ti_keywords.title_no
94. 1,366.059 1,366.059 ↑ 142.2 115 1

Seq Scan on ti_keywords (cost=0.00..66,827.52 rows=16,356 width=4) (actual time=22.156..1,366.059 rows=115 loops=1)

  • Filter: ((((entered_by)::text = 'AUTO_NAME'::text) OR ((entered_by)::text ~~ 'AUTO_AKA%'::text)) AND ((upper((word)::text) ~~ 'UNCLE'::text) OR (upper((word)::text) ~~ 'DREW'::text)))
  • Rows Removed by Filter: 2029426
95.          

SubPlan (forSubquery Scan)

96. 0.009 494.557 ↑ 23.0 1 1

HashAggregate (cost=53,097.21..53,097.44 rows=23 width=4) (actual time=494.557..494.557 rows=1 loops=1)

  • Group Key: ti_titles_1.title_no
97. 0.004 494.548 ↑ 11.5 2 1

Append (cost=0.00..53,097.15 rows=23 width=4) (actual time=28.588..494.548 rows=2 loops=1)

98. 108.657 108.657 ↑ 20.0 1 1

Seq Scan on ti_titles ti_titles_1 (cost=0.00..6,504.62 rows=20 width=4) (actual time=28.586..108.657 rows=1 loops=1)

  • Filter: ((upper((name)::text) ~~ '%UNCLE DREW%'::text) OR (upper((us_title_name)::text) ~~ '%UNCLE DREW%'::text))
  • Rows Removed by Filter: 97780
99. 0.012 385.887 ↑ 3.0 1 1

HashAggregate (cost=46,592.27..46,592.30 rows=3 width=4) (actual time=385.887..385.887 rows=1 loops=1)

  • Group Key: ti_releases_1.title_no
100. 385.875 385.875 ↑ 5.7 13 1

Seq Scan on ti_releases ti_releases_1 (cost=0.00..46,592.09 rows=74 width=4) (actual time=340.807..385.875 rows=13 loops=1)

  • Filter: (upper((aka)::text) ~~ '%UNCLE DREW%'::text)
  • Rows Removed by Filter: 741202
Planning time : 21.981 ms
Execution time : 18,733.400 ms