========================================================
 Detailed Analysis for Query: 29c 
 Source File: 29c.sql
 Date: Wed Dec 24 10:42:33 CST 2025
========================================================


################################################################
# CONFIGURATION: dp
################################################################

SET
SET
                                                                                                                      QUERY PLAN                                                                                                                      
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Aggregate  (cost=3784.36..3784.37 rows=1 width=96) (actual time=3365.315..3365.320 rows=1.00 loops=1)
   Output: min(chn.name), min(n.name), min(t.title)
   Buffers: shared hit=4332764
   ->  Nested Loop  (cost=11.08..3784.35 rows=1 width=48) (actual time=393.038..3363.794 rows=16308.00 loops=1)
         Output: chn.name, n.name, t.title
         Inner Unique: true
         Join Filter: (it3.id = pi.info_type_id)
         Rows Removed by Join Filter: 51519
         Buffers: shared hit=4332764
         ->  Nested Loop  (cost=11.08..3781.92 rows=1 width=52) (actual time=376.698..3135.304 rows=67827.00 loops=1)
               Output: chn.name, n.name, pi.info_type_id, t.title
               Inner Unique: true
               Join Filter: (ci.person_id = n.id)
               Buffers: shared hit=4264937
               ->  Nested Loop  (cost=10.65..3781.36 rows=1 width=49) (actual time=1.324..2926.519 rows=268249.00 loops=1)
                     Output: an.person_id, ci.person_id, chn.name, pi.person_id, pi.info_type_id, t.title
                     Inner Unique: true
                     Join Filter: (it.id = mi.info_type_id)
                     Buffers: shared hit=3191941
                     ->  Nested Loop  (cost=10.65..3778.94 rows=1 width=53) (actual time=1.316..2603.079 rows=268249.00 loops=1)
                           Output: an.person_id, ci.person_id, chn.name, mi.info_type_id, pi.person_id, pi.info_type_id, t.title
                           Join Filter: (mi.movie_id = t.id)
                           Buffers: shared hit=2923692
                           ->  Nested Loop  (cost=10.21..3777.35 rows=1 width=69) (actual time=1.282..149.453 rows=84042.00 loops=1)
                                 Output: an.person_id, ci.movie_id, ci.person_id, cc.movie_id, chn.name, mc.movie_id, mk.movie_id, pi.person_id, pi.info_type_id, t.title, t.id
                                 Inner Unique: true
                                 Buffers: shared hit=485637
                                 ->  Nested Loop  (cost=9.78..3776.69 rows=1 width=57) (actual time=1.268..75.227 rows=86531.00 loops=1)
                                       Output: an.person_id, ci.movie_id, ci.person_id, ci.person_role_id, cc.movie_id, mc.movie_id, mk.movie_id, pi.person_id, pi.info_type_id, t.title, t.id
                                       Join Filter: (an.person_id = ci.person_id)
                                       Buffers: shared hit=149469
                                       ->  Nested Loop  (cost=9.36..3776.20 rows=1 width=53) (actual time=1.254..44.463 rows=27341.00 loops=1)
                                             Output: cc.movie_id, ci.movie_id, ci.person_id, ci.person_role_id, mc.movie_id, mk.movie_id, pi.person_id, pi.info_type_id, t.title, t.id
                                             Buffers: shared hit=67445
                                             ->  Nested Loop  (cost=8.93..3774.83 rows=1 width=45) (actual time=1.240..34.847 rows=651.00 loops=1)
                                                   Output: cc.movie_id, ci.movie_id, ci.person_id, ci.person_role_id, mc.movie_id, mk.movie_id, t.title, t.id
                                                   Inner Unique: true
                                                   Join Filter: (ci.role_id = rt.id)
                                                   Rows Removed by Join Filter: 2015
                                                   Buffers: shared hit=64284
                                                   ->  Nested Loop  (cost=8.93..3773.66 rows=1 width=49) (actual time=0.794..32.023 rows=2666.00 loops=1)
                                                         Output: cc.movie_id, ci.movie_id, ci.person_id, ci.role_id, ci.person_role_id, mc.movie_id, mk.movie_id, t.title, t.id
                                                         Inner Unique: true
                                                         Buffers: shared hit=61618
                                                         ->  Nested Loop  (cost=8.51..3773.22 rows=1 width=53) (actual time=0.753..17.600 rows=13370.00 loops=1)
                                                               Output: cc.movie_id, ci.movie_id, ci.person_id, ci.role_id, ci.person_role_id, mc.movie_id, mc.company_id, mk.movie_id, t.title, t.id
                                                               Join Filter: (mc.movie_id = t.id)
                                                               Buffers: shared hit=8138
                                                               ->  Nested Loop  (cost=8.08..3772.62 rows=1 width=45) (actual time=0.741..14.808 rows=541.00 loops=1)
                                                                     Output: cc.movie_id, ci.movie_id, ci.person_id, ci.role_id, ci.person_role_id, mk.movie_id, t.title, t.id
                                                                     Join Filter: (ci.movie_id = t.id)
                                                                     Buffers: shared hit=5433
                                                                     ->  Nested Loop  (cost=7.64..3771.05 rows=1 width=29) (actual time=0.650..7.981 rows=18.00 loops=1)
                                                                           Output: cc.movie_id, mk.movie_id, t.title, t.id
                                                                           Inner Unique: true
                                                                           Buffers: shared hit=2736
                                                                           ->  Nested Loop  (cost=7.21..3769.58 rows=3 width=8) (actual time=0.472..7.663 rows=23.00 loops=1)
                                                                                 Output: cc.movie_id, mk.movie_id
                                                                                 Join Filter: (cct2.id = cc.status_id)
                                                                                 Rows Removed by Join Filter: 51
                                                                                 Buffers: shared hit=2644
                                                                                 ->  Seq Scan on public.comp_cast_type cct2  (cost=0.00..1.05 rows=1 width=4) (actual time=0.019..0.020 rows=1.00 loops=1)
                                                                                       Output: cct2.id, cct2.kind
                                                                                       Filter: ((cct2.kind)::text = 'complete+verified'::text)
                                                                                       Rows Removed by Filter: 3
                                                                                       Buffers: shared hit=1
                                                                                 ->  Nested Loop  (cost=7.21..3768.38 rows=12 width=12) (actual time=0.192..7.632 rows=74.00 loops=1)
                                                                                       Output: cc.movie_id, cc.status_id, mk.movie_id
                                                                                       Join Filter: (cct1.id = cc.subject_id)
                                                                                       Rows Removed by Join Filter: 16
                                                                                       Buffers: shared hit=2643
                                                                                       ->  Seq Scan on public.comp_cast_type cct1  (cost=0.00..1.05 rows=1 width=4) (actual time=0.001..0.002 rows=1.00 loops=1)
                                                                                             Output: cct1.id, cct1.kind
                                                                                             Filter: ((cct1.kind)::text = 'cast'::text)
                                                                                             Rows Removed by Filter: 3
                                                                                             Buffers: shared hit=1
                                                                                       ->  Nested Loop  (cost=7.21..3766.75 rows=46 width=16) (actual time=0.191..7.618 rows=90.00 loops=1)
                                                                                             Output: cc.movie_id, cc.subject_id, cc.status_id, mk.movie_id
                                                                                             Buffers: shared hit=2642
                                                                                             ->  Nested Loop  (cost=6.79..3750.57 rows=34 width=4) (actual time=0.092..6.593 rows=414.00 loops=1)
                                                                                                   Output: mk.movie_id
                                                                                                   Buffers: shared hit=1310
                                                                                                   ->  Seq Scan on public.keyword k  (cost=0.00..2626.12 rows=1 width=4) (actual time=0.031..5.744 rows=1.00 loops=1)
                                                                                                         Output: k.id, k.keyword, k.phonetic_code
                                                                                                         Filter: (k.keyword = 'computer-animation'::text)
                                                                                                         Rows Removed by Filter: 134169
                                                                                                         Buffers: shared hit=949
                                                                                                   ->  Bitmap Heap Scan on public.movie_keyword mk  (cost=6.79..1121.40 rows=304 width=8) (actual time=0.060..0.821 rows=414.00 loops=1)
                                                                                                         Output: mk.id, mk.movie_id, mk.keyword_id
                                                                                                         Recheck Cond: (k.id = mk.keyword_id)
                                                                                                         Heap Blocks: exact=358
                                                                                                         Buffers: shared hit=361
                                                                                                         ->  Bitmap Index Scan on keyword_id_movie_keyword  (cost=0.00..6.71 rows=304 width=0) (actual time=0.032..0.033 rows=414.00 loops=1)
                                                                                                               Index Cond: (mk.keyword_id = k.id)
                                                                                                               Index Searches: 1
                                                                                                               Buffers: shared hit=3
                                                                                             ->  Index Scan using movie_id_complete_cast on public.complete_cast cc  (cost=0.42..0.46 rows=2 width=12) (actual time=0.002..0.002 rows=0.22 loops=414)
                                                                                                   Output: cc.id, cc.movie_id, cc.subject_id, cc.status_id
                                                                                                   Index Cond: (cc.movie_id = mk.movie_id)
                                                                                                   Index Searches: 414
                                                                                                   Buffers: shared hit=1332
                                                                           ->  Index Scan using title_pkey on public.title t  (cost=0.43..0.49 rows=1 width=21) (actual time=0.012..0.012 rows=0.78 loops=23)
                                                                                 Output: t.id, t.title, t.imdb_index, t.kind_id, t.production_year, t.imdb_id, t.phonetic_code, t.episode_of_id, t.season_nr, t.episode_nr, t.series_years, t.md5sum
                                                                                 Index Cond: (t.id = mk.movie_id)
                                                                                 Filter: ((t.production_year >= 2000) AND (t.production_year <= 2010))
                                                                                 Rows Removed by Filter: 0
                                                                                 Index Searches: 23
                                                                                 Buffers: shared hit=92
                                                                     ->  Index Scan using movie_id_cast_info on public.cast_info ci  (cost=0.44..1.55 rows=1 width=16) (actual time=0.044..0.374 rows=30.06 loops=18)
                                                                           Output: ci.id, ci.person_id, ci.movie_id, ci.person_role_id, ci.note, ci.nr_order, ci.role_id
                                                                           Index Cond: (ci.movie_id = mk.movie_id)
                                                                           Filter: (ci.note = ANY ('{(voice),"(voice: Japanese version)","(voice) (uncredited)","(voice: English version)"}'::text[]))
                                                                           Rows Removed by Filter: 124
                                                                           Index Searches: 18
                                                                           Buffers: shared hit=2697
                                                               ->  Index Scan using movie_id_movie_companies on public.movie_companies mc  (cost=0.43..0.54 rows=5 width=8) (actual time=0.001..0.003 rows=24.71 loops=541)
                                                                     Output: mc.id, mc.movie_id, mc.company_id, mc.company_type_id, mc.note
                                                                     Index Cond: (mc.movie_id = mk.movie_id)
                                                                     Index Searches: 541
                                                                     Buffers: shared hit=2705
                                                         ->  Index Scan using company_name_pkey on public.company_name cn  (cost=0.42..0.45 rows=1 width=4) (actual time=0.001..0.001 rows=0.20 loops=13370)
                                                               Output: cn.id, cn.name, cn.country_code, cn.imdb_id, cn.name_pcode_nf, cn.name_pcode_sf, cn.md5sum
                                                               Index Cond: (cn.id = mc.company_id)
                                                               Filter: ((cn.country_code)::text = '[us]'::text)
                                                               Rows Removed by Filter: 1
                                                               Index Searches: 13370
                                                               Buffers: shared hit=53480
                                                   ->  Seq Scan on public.role_type rt  (cost=0.00..1.15 rows=1 width=4) (actual time=0.000..0.000 rows=1.00 loops=2666)
                                                         Output: rt.id, rt.role
                                                         Filter: ((rt.role)::text = 'actress'::text)
                                                         Rows Removed by Filter: 9
                                                         Buffers: shared hit=2666
                                             ->  Index Scan using person_id_person_info on public.person_info pi  (cost=0.43..1.12 rows=25 width=8) (actual time=0.002..0.011 rows=42.00 loops=651)
                                                   Output: pi.id, pi.person_id, pi.info_type_id, pi.info, pi.note
                                                   Index Cond: (pi.person_id = ci.person_id)
                                                   Index Searches: 651
                                                   Buffers: shared hit=3161
                                       ->  Index Only Scan using person_id_aka_name on public.aka_name an  (cost=0.42..0.46 rows=2 width=4) (actual time=0.001..0.001 rows=3.16 loops=27341)
                                             Output: an.person_id
                                             Index Cond: (an.person_id = pi.person_id)
                                             Heap Fetches: 0
                                             Index Searches: 27341
                                             Buffers: shared hit=82024
                                 ->  Index Scan using char_name_pkey on public.char_name chn  (cost=0.43..0.67 rows=1 width=20) (actual time=0.001..0.001 rows=0.97 loops=86531)
                                       Output: chn.id, chn.name, chn.imdb_index, chn.imdb_id, chn.name_pcode_nf, chn.surname_pcode, chn.md5sum
                                       Index Cond: (chn.id = ci.person_role_id)
                                       Index Searches: 84042
                                       Buffers: shared hit=336168
                           ->  Index Scan using movie_id_movie_info on public.movie_info mi  (cost=0.43..1.56 rows=2 width=8) (actual time=0.003..0.029 rows=3.19 loops=84042)
                                 Output: mi.id, mi.movie_id, mi.info_type_id, mi.info, mi.note
                                 Index Cond: (mi.movie_id = mk.movie_id)
                                 Filter: ((mi.info ~~ 'Japan:%200%'::text) OR (mi.info ~~ 'USA:%200%'::text))
                                 Rows Removed by Filter: 332
                                 Index Searches: 84042
                                 Buffers: shared hit=2438055
                     ->  Seq Scan on public.info_type it  (cost=0.00..2.41 rows=1 width=4) (actual time=0.001..0.001 rows=1.00 loops=268249)
                           Output: it.id, it.info
                           Filter: ((it.info)::text = 'release dates'::text)
                           Rows Removed by Filter: 15
                           Buffers: shared hit=268249
               ->  Index Scan using name_pkey on public.name n  (cost=0.43..0.55 rows=1 width=19) (actual time=0.001..0.001 rows=0.25 loops=268249)
                     Output: n.id, n.name, n.imdb_index, n.imdb_id, n.gender, n.name_pcode_cf, n.name_pcode_nf, n.surname_pcode, n.md5sum
                     Index Cond: (n.id = pi.person_id)
                     Filter: ((n.name ~~ '%An%'::text) AND ((n.gender)::text = 'f'::text))
                     Rows Removed by Filter: 1
                     Index Searches: 268249
                     Buffers: shared hit=1072996
         ->  Seq Scan on public.info_type it3  (cost=0.00..2.41 rows=1 width=4) (actual time=0.001..0.003 rows=1.00 loops=67827)
               Output: it3.id, it3.info
               Filter: ((it3.info)::text = 'trivia'::text)
               Rows Removed by Filter: 89
               Buffers: shared hit=67827
 Planning:
   Buffers: shared hit=1209
 Planning Time: 909.052 ms
 Execution Time: 3365.445 ms
(176 rows)


################################################################
# CONFIGURATION: goo_cost
################################################################

SET
SET
SET
                                                                                                                           QUERY PLAN                                                                                                                            
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Aggregate  (cost=6829.85..6829.86 rows=1 width=96) (actual time=1450.464..1450.474 rows=1.00 loops=1)
   Output: min(chn.name), min(n.name), min(t.title)
   Buffers: shared hit=1565151
   ->  Hash Join  (cost=3803.42..6829.84 rows=1 width=48) (actual time=1436.071..1449.287 rows=16308.00 loops=1)
         Output: chn.name, n.name, t.title
         Hash Cond: (cc.movie_id = t.id)
         Buffers: shared hit=1565151
         ->  Hash Join  (cost=2.12..2996.88 rows=8443 width=4) (actual time=0.036..16.538 rows=17879.00 loops=1)
               Output: cc.movie_id
               Inner Unique: true
               Hash Cond: (cc.status_id = cct2.id)
               Buffers: shared hit=733
               ->  Hash Join  (cost=1.06..2813.24 rows=33772 width=8) (actual time=0.018..13.057 rows=85941.00 loops=1)
                     Output: cc.movie_id, cc.status_id
                     Inner Unique: true
                     Hash Cond: (cc.subject_id = cct1.id)
                     Buffers: shared hit=732
                     ->  Seq Scan on public.complete_cast cc  (cost=0.00..2081.86 rows=135086 width=12) (actual time=0.011..4.744 rows=135086.00 loops=1)
                           Output: cc.id, cc.movie_id, cc.subject_id, cc.status_id
                           Buffers: shared hit=731
                     ->  Hash  (cost=1.05..1.05 rows=1 width=4) (actual time=0.003..0.003 rows=1.00 loops=1)
                           Output: cct1.id
                           Buckets: 1024  Batches: 1  Memory Usage: 9kB
                           Buffers: shared hit=1
                           ->  Seq Scan on public.comp_cast_type cct1  (cost=0.00..1.05 rows=1 width=4) (actual time=0.001..0.001 rows=1.00 loops=1)
                                 Output: cct1.id
                                 Filter: ((cct1.kind)::text = 'cast'::text)
                                 Rows Removed by Filter: 3
                                 Buffers: shared hit=1
               ->  Hash  (cost=1.05..1.05 rows=1 width=4) (actual time=0.013..0.014 rows=1.00 loops=1)
                     Output: cct2.id
                     Buckets: 1024  Batches: 1  Memory Usage: 9kB
                     Buffers: shared hit=1
                     ->  Seq Scan on public.comp_cast_type cct2  (cost=0.00..1.05 rows=1 width=4) (actual time=0.011..0.011 rows=1.00 loops=1)
                           Output: cct2.id
                           Filter: ((cct2.kind)::text = 'complete+verified'::text)
                           Rows Removed by Filter: 3
                           Buffers: shared hit=1
         ->  Hash  (cost=3801.28..3801.28 rows=1 width=68) (actual time=1430.156..1430.161 rows=33206.00 loops=1)
               Output: mi.movie_id, n.name, chn.name, ci.movie_id, mc.movie_id, t.title, t.id, mk.movie_id
               Buckets: 65536 (originally 1024)  Batches: 1 (originally 1)  Memory Usage: 3493kB
               Buffers: shared hit=1564418
               ->  Nested Loop  (cost=10.66..3801.28 rows=1 width=68) (actual time=7.746..1425.453 rows=33206.00 loops=1)
                     Output: mi.movie_id, n.name, chn.name, ci.movie_id, mc.movie_id, t.title, t.id, mk.movie_id
                     Join Filter: (it3.id = pi.info_type_id)
                     Rows Removed by Join Filter: 100645
                     Buffers: shared hit=1564418
                     ->  Seq Scan on public.info_type it3  (cost=0.00..2.41 rows=1 width=4) (actual time=0.008..0.011 rows=1.00 loops=1)
                           Output: it3.id, it3.info
                           Filter: ((it3.info)::text = 'trivia'::text)
                           Rows Removed by Filter: 112
                           Buffers: shared hit=1
                     ->  Nested Loop  (cost=10.66..3798.86 rows=1 width=72) (actual time=7.736..1420.626 rows=133851.00 loops=1)
                           Output: mi.movie_id, pi.info_type_id, n.name, chn.name, ci.movie_id, mc.movie_id, t.title, t.id, mk.movie_id
                           Join Filter: (it.id = mi.info_type_id)
                           Buffers: shared hit=1564417
                           ->  Seq Scan on public.info_type it  (cost=0.00..2.41 rows=1 width=4) (actual time=0.003..0.007 rows=1.00 loops=1)
                                 Output: it.id, it.info
                                 Filter: ((it.info)::text = 'release dates'::text)
                                 Rows Removed by Filter: 112
                                 Buffers: shared hit=1
                           ->  Nested Loop  (cost=10.66..3796.43 rows=1 width=76) (actual time=7.733..1411.599 rows=133851.00 loops=1)
                                 Output: mi.movie_id, mi.info_type_id, pi.info_type_id, n.name, chn.name, ci.movie_id, mc.movie_id, t.title, t.id, mk.movie_id
                                 Join Filter: (mi.movie_id = t.id)
                                 Buffers: shared hit=1564416
                                 ->  Nested Loop  (cost=10.22..3794.84 rows=1 width=68) (actual time=7.703..103.189 rows=52546.00 loops=1)
                                       Output: pi.info_type_id, n.name, chn.name, ci.movie_id, mc.movie_id, t.title, t.id, mk.movie_id
                                       Join Filter: (n.id = pi.person_id)
                                       Buffers: shared hit=179999
                                       ->  Nested Loop  (cost=9.79..3793.42 rows=1 width=76) (actual time=7.692..91.568 rows=296.00 loops=1)
                                             Output: n.name, n.id, chn.name, an.person_id, ci.movie_id, ci.person_id, mc.movie_id, t.title, t.id, mk.movie_id
                                             Inner Unique: true
                                             Buffers: shared hit=177260
                                             ->  Nested Loop  (cost=9.36..3792.64 rows=1 width=57) (actual time=1.745..82.259 rows=7257.00 loops=1)
                                                   Output: chn.name, an.person_id, ci.movie_id, ci.person_id, mc.movie_id, t.title, t.id, mk.movie_id
                                                   Inner Unique: true
                                                   Buffers: shared hit=148232
                                                   ->  Nested Loop  (cost=8.93..3791.98 rows=1 width=45) (actual time=1.730..73.433 rows=8800.00 loops=1)
                                                         Output: an.person_id, ci.movie_id, ci.person_id, ci.person_role_id, mc.movie_id, t.title, t.id, mk.movie_id
                                                         Join Filter: (ci.role_id = rt.id)
                                                         Rows Removed by Join Filter: 21927
                                                         Buffers: shared hit=119204
                                                         ->  Seq Scan on public.role_type rt  (cost=0.00..1.15 rows=1 width=4) (actual time=0.007..0.008 rows=1.00 loops=1)
                                                               Output: rt.id, rt.role
                                                               Filter: ((rt.role)::text = 'actress'::text)
                                                               Rows Removed by Filter: 11
                                                               Buffers: shared hit=1
                                                         ->  Nested Loop  (cost=8.93..3790.76 rows=5 width=49) (actual time=1.680..72.228 rows=30727.00 loops=1)
                                                               Output: an.person_id, ci.movie_id, ci.person_id, ci.role_id, ci.person_role_id, mc.movie_id, t.title, t.id, mk.movie_id
                                                               Buffers: shared hit=119203
                                                               ->  Nested Loop  (cost=8.51..3789.78 rows=2 width=45) (actual time=0.153..51.915 rows=15390.00 loops=1)
                                                                     Output: ci.movie_id, ci.person_id, ci.role_id, ci.person_role_id, mc.movie_id, t.title, t.id, mk.movie_id
                                                                     Join Filter: (ci.movie_id = t.id)
                                                                     Buffers: shared hit=73032
                                                                     ->  Nested Loop  (cost=8.07..3781.97 rows=5 width=29) (actual time=0.132..17.659 rows=669.00 loops=1)
                                                                           Output: mc.movie_id, t.title, t.id, mk.movie_id
                                                                           Inner Unique: true
                                                                           Buffers: shared hit=13888
                                                                           ->  Nested Loop  (cost=7.65..3775.72 rows=14 width=33) (actual time=0.105..10.831 rows=2435.00 loops=1)
                                                                                 Output: mc.movie_id, mc.company_id, t.title, t.id, mk.movie_id
                                                                                 Join Filter: (mc.movie_id = t.id)
                                                                                 Buffers: shared hit=4148
                                                                                 ->  Nested Loop  (cost=7.22..3767.31 rows=14 width=25) (actual time=0.095..9.024 rows=249.00 loops=1)
                                                                                       Output: t.title, t.id, mk.movie_id
                                                                                       Inner Unique: true
                                                                                       Buffers: shared hit=2966
                                                                                       ->  Nested Loop  (cost=6.79..3750.57 rows=34 width=4) (actual time=0.081..6.337 rows=414.00 loops=1)
                                                                                             Output: mk.movie_id
                                                                                             Buffers: shared hit=1310
                                                                                             ->  Seq Scan on public.keyword k  (cost=0.00..2626.12 rows=1 width=4) (actual time=0.025..5.397 rows=1.00 loops=1)
                                                                                                   Output: k.id, k.keyword, k.phonetic_code
                                                                                                   Filter: (k.keyword = 'computer-animation'::text)
                                                                                                   Rows Removed by Filter: 134169
                                                                                                   Buffers: shared hit=949
                                                                                             ->  Bitmap Heap Scan on public.movie_keyword mk  (cost=6.79..1121.40 rows=304 width=8) (actual time=0.055..0.907 rows=414.00 loops=1)
                                                                                                   Output: mk.id, mk.movie_id, mk.keyword_id
                                                                                                   Recheck Cond: (k.id = mk.keyword_id)
                                                                                                   Heap Blocks: exact=358
                                                                                                   Buffers: shared hit=361
                                                                                                   ->  Bitmap Index Scan on keyword_id_movie_keyword  (cost=0.00..6.71 rows=304 width=0) (actual time=0.028..0.028 rows=414.00 loops=1)
                                                                                                         Index Cond: (mk.keyword_id = k.id)
                                                                                                         Index Searches: 1
                                                                                                         Buffers: shared hit=3
                                                                                       ->  Index Scan using title_pkey on public.title t  (cost=0.43..0.49 rows=1 width=21) (actual time=0.006..0.006 rows=0.60 loops=414)
                                                                                             Output: t.id, t.title, t.imdb_index, t.kind_id, t.production_year, t.imdb_id, t.phonetic_code, t.episode_of_id, t.season_nr, t.episode_nr, t.series_years, t.md5sum
                                                                                             Index Cond: (t.id = mk.movie_id)
                                                                                             Filter: ((t.production_year >= 2000) AND (t.production_year <= 2010))
                                                                                             Rows Removed by Filter: 0
                                                                                             Index Searches: 414
                                                                                             Buffers: shared hit=1656
                                                                                 ->  Index Scan using movie_id_movie_companies on public.movie_companies mc  (cost=0.43..0.54 rows=5 width=8) (actual time=0.004..0.006 rows=9.78 loops=249)
                                                                                       Output: mc.id, mc.movie_id, mc.company_id, mc.company_type_id, mc.note
                                                                                       Index Cond: (mc.movie_id = mk.movie_id)
                                                                                       Index Searches: 249
                                                                                       Buffers: shared hit=1182
                                                                           ->  Index Scan using company_name_pkey on public.company_name cn  (cost=0.42..0.45 rows=1 width=4) (actual time=0.003..0.003 rows=0.27 loops=2435)
                                                                                 Output: cn.id, cn.name, cn.country_code, cn.imdb_id, cn.name_pcode_nf, cn.name_pcode_sf, cn.md5sum
                                                                                 Index Cond: (cn.id = mc.company_id)
                                                                                 Filter: ((cn.country_code)::text = '[us]'::text)
                                                                                 Rows Removed by Filter: 1
                                                                                 Index Searches: 2435
                                                                                 Buffers: shared hit=9740
                                                                     ->  Index Scan using movie_id_cast_info on public.cast_info ci  (cost=0.44..1.55 rows=1 width=16) (actual time=0.007..0.049 rows=23.00 loops=669)
                                                                           Output: ci.id, ci.person_id, ci.movie_id, ci.person_role_id, ci.note, ci.nr_order, ci.role_id
                                                                           Index Cond: (ci.movie_id = mk.movie_id)
                                                                           Filter: (ci.note = ANY ('{(voice),"(voice: Japanese version)","(voice) (uncredited)","(voice: English version)"}'::text[]))
                                                                           Rows Removed by Filter: 68
                                                                           Index Searches: 669
                                                                           Buffers: shared hit=59144
                                                               ->  Index Only Scan using person_id_aka_name on public.aka_name an  (cost=0.42..0.47 rows=2 width=4) (actual time=0.001..0.001 rows=2.00 loops=15390)
                                                                     Output: an.person_id
                                                                     Index Cond: (an.person_id = ci.person_id)
                                                                     Heap Fetches: 0
                                                                     Index Searches: 15390
                                                                     Buffers: shared hit=46171
                                                   ->  Index Scan using char_name_pkey on public.char_name chn  (cost=0.43..0.67 rows=1 width=20) (actual time=0.001..0.001 rows=0.82 loops=8800)
                                                         Output: chn.id, chn.name, chn.imdb_index, chn.imdb_id, chn.name_pcode_nf, chn.surname_pcode, chn.md5sum
                                                         Index Cond: (chn.id = ci.person_role_id)
                                                         Index Searches: 7257
                                                         Buffers: shared hit=29028
                                             ->  Index Scan using name_pkey on public.name n  (cost=0.43..0.78 rows=1 width=19) (actual time=0.001..0.001 rows=0.04 loops=7257)
                                                   Output: n.id, n.name, n.imdb_index, n.imdb_id, n.gender, n.name_pcode_cf, n.name_pcode_nf, n.surname_pcode, n.md5sum
                                                   Index Cond: (n.id = ci.person_id)
                                                   Filter: ((n.name ~~ '%An%'::text) AND ((n.gender)::text = 'f'::text))
                                                   Rows Removed by Filter: 1
                                                   Index Searches: 7257
                                                   Buffers: shared hit=29028
                                       ->  Index Scan using person_id_person_info on public.person_info pi  (cost=0.43..1.11 rows=25 width=8) (actual time=0.002..0.025 rows=177.52 loops=296)
                                             Output: pi.id, pi.person_id, pi.info_type_id, pi.info, pi.note
                                             Index Cond: (pi.person_id = an.person_id)
                                             Index Searches: 296
                                             Buffers: shared hit=2739
                                 ->  Index Scan using movie_id_movie_info on public.movie_info mi  (cost=0.43..1.56 rows=2 width=8) (actual time=0.005..0.025 rows=2.55 loops=52546)
                                       Output: mi.id, mi.movie_id, mi.info_type_id, mi.info, mi.note
                                       Index Cond: (mi.movie_id = mk.movie_id)
                                       Filter: ((mi.info ~~ 'Japan:%200%'::text) OR (mi.info ~~ 'USA:%200%'::text))
                                       Rows Removed by Filter: 289
                                       Index Searches: 52546
                                       Buffers: shared hit=1384417
 Planning:
   Buffers: shared hit=1209
 Planning Time: 4.323 ms
 Execution Time: 1450.659 ms
(183 rows)


################################################################
# CONFIGURATION: goo_result_size
################################################################

SET
SET
SET
                                                                                                                              QUERY PLAN                                                                                                                               
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Aggregate  (cost=3789.72..3789.73 rows=1 width=96) (actual time=47.511..47.515 rows=1.00 loops=1)
   Output: min(chn.name), min(n.name), min(t.title)
   Buffers: shared hit=77426
   ->  Nested Loop  (cost=11.08..3789.71 rows=1 width=48) (actual time=11.451..46.325 rows=16308.00 loops=1)
         Output: chn.name, n.name, t.title
         Join Filter: (it3.id = pi.info_type_id)
         Rows Removed by Join Filter: 51519
         Buffers: shared hit=77426
         ->  Seq Scan on public.info_type it3  (cost=0.00..2.41 rows=1 width=4) (actual time=0.007..0.011 rows=1.00 loops=1)
               Output: it3.id, it3.info
               Filter: ((it3.info)::text = 'trivia'::text)
               Rows Removed by Filter: 112
               Buffers: shared hit=1
         ->  Nested Loop  (cost=11.08..3787.29 rows=1 width=52) (actual time=11.421..44.226 rows=67827.00 loops=1)
               Output: pi.info_type_id, n.name, chn.name, t.title
               Join Filter: (n.id = pi.person_id)
               Buffers: shared hit=77425
               ->  Nested Loop  (cost=10.65..3785.86 rows=1 width=60) (actual time=11.409..36.224 rows=189.00 loops=1)
                     Output: an.person_id, n.name, n.id, chn.name, ci.person_id, t.title
                     Join Filter: (an.person_id = n.id)
                     Buffers: shared hit=74914
                     ->  Nested Loop  (cost=10.22..3785.37 rows=1 width=56) (actual time=11.398..36.144 rows=46.00 loops=1)
                           Output: n.name, n.id, chn.name, ci.person_id, t.title
                           Inner Unique: true
                           Buffers: shared hit=74775
                           ->  Nested Loop  (cost=9.79..3784.59 rows=1 width=37) (actual time=1.516..33.904 rows=1624.00 loops=1)
                                 Output: chn.name, ci.person_id, t.title
                                 Inner Unique: true
                                 Buffers: shared hit=68279
                                 ->  Nested Loop  (cost=9.36..3783.93 rows=1 width=25) (actual time=1.506..31.743 rows=2088.00 loops=1)
                                       Output: ci.person_id, ci.person_role_id, t.title
                                       Join Filter: (ci.role_id = rt.id)
                                       Rows Removed by Join Filter: 6875
                                       Buffers: shared hit=61783
                                       ->  Seq Scan on public.role_type rt  (cost=0.00..1.15 rows=1 width=4) (actual time=0.007..0.008 rows=1.00 loops=1)
                                             Output: rt.id, rt.role
                                             Filter: ((rt.role)::text = 'actress'::text)
                                             Rows Removed by Filter: 11
                                             Buffers: shared hit=1
                                       ->  Nested Loop  (cost=9.36..3782.76 rows=1 width=29) (actual time=1.402..31.422 rows=8963.00 loops=1)
                                             Output: ci.person_id, ci.role_id, ci.person_role_id, t.title
                                             Join Filter: (it.id = mi.info_type_id)
                                             Buffers: shared hit=61782
                                             ->  Seq Scan on public.info_type it  (cost=0.00..2.41 rows=1 width=4) (actual time=0.003..0.007 rows=1.00 loops=1)
                                                   Output: it.id, it.info
                                                   Filter: ((it.info)::text = 'release dates'::text)
                                                   Rows Removed by Filter: 112
                                                   Buffers: shared hit=1
                                             ->  Nested Loop  (cost=9.36..3780.34 rows=1 width=33) (actual time=1.399..30.931 rows=8963.00 loops=1)
                                                   Output: ci.person_id, ci.role_id, ci.person_role_id, mi.info_type_id, t.title
                                                   Join Filter: (ci.movie_id = t.id)
                                                   Buffers: shared hit=61781
                                                   ->  Nested Loop  (cost=8.92..3778.77 rows=1 width=41) (actual time=1.368..15.152 rows=337.00 loops=1)
                                                         Output: mi.movie_id, mi.info_type_id, mc.movie_id, cc.movie_id, t.title, t.id, mk.movie_id
                                                         Join Filter: (mi.movie_id = t.id)
                                                         Buffers: shared hit=8317
                                                         ->  Nested Loop  (cost=8.49..3777.19 rows=1 width=33) (actual time=1.337..11.150 rows=92.00 loops=1)
                                                               Output: mc.movie_id, cc.movie_id, t.title, t.id, mk.movie_id
                                                               Inner Unique: true
                                                               Buffers: shared hit=5528
                                                               ->  Nested Loop  (cost=8.07..3776.74 rows=1 width=37) (actual time=1.297..9.918 rows=415.00 loops=1)
                                                                     Output: mc.movie_id, mc.company_id, cc.movie_id, t.title, t.id, mk.movie_id
                                                                     Join Filter: (mc.movie_id = t.id)
                                                                     Buffers: shared hit=3868
                                                                     ->  Nested Loop  (cost=7.64..3776.14 rows=1 width=29) (actual time=1.289..9.706 rows=18.00 loops=1)
                                                                           Output: cc.movie_id, t.title, t.id, mk.movie_id
                                                                           Join Filter: (cct2.id = cc.status_id)
                                                                           Rows Removed by Join Filter: 37
                                                                           Buffers: shared hit=3776
                                                                           ->  Seq Scan on public.comp_cast_type cct2  (cost=0.00..1.05 rows=1 width=4) (actual time=0.005..0.006 rows=1.00 loops=1)
                                                                                 Output: cct2.id, cct2.kind
                                                                                 Filter: ((cct2.kind)::text = 'complete+verified'::text)
                                                                                 Rows Removed by Filter: 3
                                                                                 Buffers: shared hit=1
                                                                           ->  Nested Loop  (cost=7.64..3775.08 rows=1 width=33) (actual time=1.219..9.694 rows=55.00 loops=1)
                                                                                 Output: cc.movie_id, cc.status_id, t.title, t.id, mk.movie_id
                                                                                 Join Filter: (cct1.id = cc.subject_id)
                                                                                 Rows Removed by Join Filter: 6
                                                                                 Buffers: shared hit=3775
                                                                                 ->  Seq Scan on public.comp_cast_type cct1  (cost=0.00..1.05 rows=1 width=4) (actual time=0.001..0.002 rows=1.00 loops=1)
                                                                                       Output: cct1.id, cct1.kind
                                                                                       Filter: ((cct1.kind)::text = 'cast'::text)
                                                                                       Rows Removed by Filter: 3
                                                                                       Buffers: shared hit=1
                                                                                 ->  Nested Loop  (cost=7.64..3774.02 rows=1 width=37) (actual time=1.218..9.686 rows=61.00 loops=1)
                                                                                       Output: cc.movie_id, cc.subject_id, cc.status_id, t.title, t.id, mk.movie_id
                                                                                       Buffers: shared hit=3774
                                                                                       ->  Nested Loop  (cost=7.22..3767.31 rows=14 width=25) (actual time=0.099..9.008 rows=249.00 loops=1)
                                                                                             Output: t.title, t.id, mk.movie_id
                                                                                             Inner Unique: true
                                                                                             Buffers: shared hit=2966
                                                                                             ->  Nested Loop  (cost=6.79..3750.57 rows=34 width=4) (actual time=0.087..6.276 rows=414.00 loops=1)
                                                                                                   Output: mk.movie_id
                                                                                                   Buffers: shared hit=1310
                                                                                                   ->  Seq Scan on public.keyword k  (cost=0.00..2626.12 rows=1 width=4) (actual time=0.028..5.514 rows=1.00 loops=1)
                                                                                                         Output: k.id, k.keyword, k.phonetic_code
                                                                                                         Filter: (k.keyword = 'computer-animation'::text)
                                                                                                         Rows Removed by Filter: 134169
                                                                                                         Buffers: shared hit=949
                                                                                                   ->  Bitmap Heap Scan on public.movie_keyword mk  (cost=6.79..1121.40 rows=304 width=8) (actual time=0.058..0.738 rows=414.00 loops=1)
                                                                                                         Output: mk.id, mk.movie_id, mk.keyword_id
                                                                                                         Recheck Cond: (k.id = mk.keyword_id)
                                                                                                         Heap Blocks: exact=358
                                                                                                         Buffers: shared hit=361
                                                                                                         ->  Bitmap Index Scan on keyword_id_movie_keyword  (cost=0.00..6.71 rows=304 width=0) (actual time=0.029..0.029 rows=414.00 loops=1)
                                                                                                               Index Cond: (mk.keyword_id = k.id)
                                                                                                               Index Searches: 1
                                                                                                               Buffers: shared hit=3
                                                                                             ->  Index Scan using title_pkey on public.title t  (cost=0.43..0.49 rows=1 width=21) (actual time=0.006..0.006 rows=0.60 loops=414)
                                                                                                   Output: t.id, t.title, t.imdb_index, t.kind_id, t.production_year, t.imdb_id, t.phonetic_code, t.episode_of_id, t.season_nr, t.episode_nr, t.series_years, t.md5sum
                                                                                                   Index Cond: (t.id = mk.movie_id)
                                                                                                   Filter: ((t.production_year >= 2000) AND (t.production_year <= 2010))
                                                                                                   Rows Removed by Filter: 0
                                                                                                   Index Searches: 414
                                                                                                   Buffers: shared hit=1656
                                                                                       ->  Index Scan using movie_id_complete_cast on public.complete_cast cc  (cost=0.42..0.46 rows=2 width=12) (actual time=0.003..0.003 rows=0.24 loops=249)
                                                                                             Output: cc.id, cc.movie_id, cc.subject_id, cc.status_id
                                                                                             Index Cond: (cc.movie_id = t.id)
                                                                                             Index Searches: 249
                                                                                             Buffers: shared hit=808
                                                                     ->  Index Scan using movie_id_movie_companies on public.movie_companies mc  (cost=0.43..0.54 rows=5 width=8) (actual time=0.006..0.010 rows=23.06 loops=18)
                                                                           Output: mc.id, mc.movie_id, mc.company_id, mc.company_type_id, mc.note
                                                                           Index Cond: (mc.movie_id = mk.movie_id)
                                                                           Index Searches: 18
                                                                           Buffers: shared hit=92
                                                               ->  Index Scan using company_name_pkey on public.company_name cn  (cost=0.42..0.45 rows=1 width=4) (actual time=0.003..0.003 rows=0.22 loops=415)
                                                                     Output: cn.id, cn.name, cn.country_code, cn.imdb_id, cn.name_pcode_nf, cn.name_pcode_sf, cn.md5sum
                                                                     Index Cond: (cn.id = mc.company_id)
                                                                     Filter: ((cn.country_code)::text = '[us]'::text)
                                                                     Rows Removed by Filter: 1
                                                                     Index Searches: 415
                                                                     Buffers: shared hit=1660
                                                         ->  Index Scan using movie_id_movie_info on public.movie_info mi  (cost=0.43..1.56 rows=2 width=8) (actual time=0.007..0.043 rows=3.66 loops=92)
                                                               Output: mi.id, mi.movie_id, mi.info_type_id, mi.info, mi.note
                                                               Index Cond: (mi.movie_id = mk.movie_id)
                                                               Filter: ((mi.info ~~ 'Japan:%200%'::text) OR (mi.info ~~ 'USA:%200%'::text))
                                                               Rows Removed by Filter: 330
                                                               Index Searches: 92
                                                               Buffers: shared hit=2789
                                                   ->  Index Scan using movie_id_cast_info on public.cast_info ci  (cost=0.44..1.55 rows=1 width=16) (actual time=0.006..0.045 rows=26.60 loops=337)
                                                         Output: ci.id, ci.person_id, ci.movie_id, ci.person_role_id, ci.note, ci.nr_order, ci.role_id
                                                         Index Cond: (ci.movie_id = mk.movie_id)
                                                         Filter: (ci.note = ANY ('{(voice),"(voice: Japanese version)","(voice) (uncredited)","(voice: English version)"}'::text[]))
                                                         Rows Removed by Filter: 136
                                                         Index Searches: 337
                                                         Buffers: shared hit=53464
                                 ->  Index Scan using char_name_pkey on public.char_name chn  (cost=0.43..0.67 rows=1 width=20) (actual time=0.001..0.001 rows=0.78 loops=2088)
                                       Output: chn.id, chn.name, chn.imdb_index, chn.imdb_id, chn.name_pcode_nf, chn.surname_pcode, chn.md5sum
                                       Index Cond: (chn.id = ci.person_role_id)
                                       Index Searches: 1624
                                       Buffers: shared hit=6496
                           ->  Index Scan using name_pkey on public.name n  (cost=0.43..0.78 rows=1 width=19) (actual time=0.001..0.001 rows=0.03 loops=1624)
                                 Output: n.id, n.name, n.imdb_index, n.imdb_id, n.gender, n.name_pcode_cf, n.name_pcode_nf, n.surname_pcode, n.md5sum
                                 Index Cond: (n.id = ci.person_id)
                                 Filter: ((n.name ~~ '%An%'::text) AND ((n.gender)::text = 'f'::text))
                                 Rows Removed by Filter: 1
                                 Index Searches: 1624
                                 Buffers: shared hit=6496
                     ->  Index Only Scan using person_id_aka_name on public.aka_name an  (cost=0.42..0.47 rows=2 width=4) (actual time=0.001..0.001 rows=4.11 loops=46)
                           Output: an.person_id
                           Index Cond: (an.person_id = ci.person_id)
                           Heap Fetches: 0
                           Index Searches: 46
                           Buffers: shared hit=139
               ->  Index Scan using person_id_person_info on public.person_info pi  (cost=0.43..1.11 rows=25 width=8) (actual time=0.001..0.020 rows=358.87 loops=189)
                     Output: pi.id, pi.person_id, pi.info_type_id, pi.info, pi.note
                     Index Cond: (pi.person_id = an.person_id)
                     Index Searches: 189
                     Buffers: shared hit=2511
 Planning:
   Buffers: shared hit=1209
 Planning Time: 4.116 ms
 Execution Time: 47.606 ms
(173 rows)


################################################################
# CONFIGURATION: geqo
################################################################

SET
SET
                                                                                                                              QUERY PLAN                                                                                                                               
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Aggregate  (cost=3804.53..3804.54 rows=1 width=96) (actual time=270.515..270.519 rows=1.00 loops=1)
   Output: min(chn.name), min(n.name), min(t.title)
   Buffers: shared hit=409882
   ->  Nested Loop  (cost=11.08..3804.52 rows=1 width=48) (actual time=77.465..269.317 rows=16308.00 loops=1)
         Output: chn.name, n.name, t.title
         Join Filter: (it3.id = pi.info_type_id)
         Rows Removed by Join Filter: 51519
         Buffers: shared hit=409882
         ->  Seq Scan on public.info_type it3  (cost=0.00..2.41 rows=1 width=4) (actual time=0.018..0.022 rows=1.00 loops=1)
               Output: it3.id, it3.info
               Filter: ((it3.info)::text = 'trivia'::text)
               Rows Removed by Filter: 112
               Buffers: shared hit=1
         ->  Nested Loop  (cost=11.08..3802.09 rows=1 width=52) (actual time=77.426..267.184 rows=67827.00 loops=1)
               Output: chn.name, t.title, n.name, pi.info_type_id
               Join Filter: (n.id = pi.person_id)
               Buffers: shared hit=409881
               ->  Nested Loop  (cost=10.65..3800.67 rows=1 width=60) (actual time=77.405..259.036 rows=189.00 loops=1)
                     Output: chn.name, an.person_id, t.title, ci.person_id, n.name, n.id
                     Inner Unique: true
                     Join Filter: (cct2.id = cc.status_id)
                     Rows Removed by Join Filter: 305
                     Buffers: shared hit=407370
                     ->  Nested Loop  (cost=10.65..3799.61 rows=1 width=64) (actual time=14.648..258.620 rows=494.00 loops=1)
                           Output: chn.name, an.person_id, t.title, ci.person_id, n.name, n.id, cc.status_id
                           Join Filter: (cct1.id = cc.subject_id)
                           Buffers: shared hit=406876
                           ->  Seq Scan on public.comp_cast_type cct1  (cost=0.00..1.05 rows=1 width=4) (actual time=0.010..0.011 rows=1.00 loops=1)
                                 Output: cct1.id, cct1.kind
                                 Filter: ((cct1.kind)::text = 'cast'::text)
                                 Rows Removed by Filter: 3
                                 Buffers: shared hit=1
                           ->  Nested Loop  (cost=10.65..3798.54 rows=1 width=68) (actual time=14.636..258.567 rows=494.00 loops=1)
                                 Output: chn.name, an.person_id, t.title, ci.person_id, n.name, n.id, cc.subject_id, cc.status_id
                                 Buffers: shared hit=406875
                                 ->  Nested Loop  (cost=10.23..3798.07 rows=1 width=80) (actual time=10.550..257.954 rows=665.00 loops=1)
                                       Output: chn.name, an.person_id, mk.movie_id, t.title, t.id, ci.movie_id, ci.person_id, mc.movie_id, mi.movie_id, n.name, n.id
                                       Inner Unique: true
                                       Buffers: shared hit=404386
                                       ->  Nested Loop  (cost=9.80..3797.29 rows=1 width=61) (actual time=3.150..242.146 rows=16815.00 loops=1)
                                             Output: chn.name, an.person_id, mk.movie_id, t.title, t.id, ci.movie_id, ci.person_id, mc.movie_id, mi.movie_id
                                             Inner Unique: true
                                             Join Filter: (it.id = mi.info_type_id)
                                             Buffers: shared hit=337126
                                             ->  Nested Loop  (cost=9.80..3794.86 rows=1 width=65) (actual time=3.147..221.787 rows=16815.00 loops=1)
                                                   Output: chn.name, an.person_id, mk.movie_id, t.title, t.id, ci.movie_id, ci.person_id, mc.movie_id, mi.movie_id, mi.info_type_id
                                                   Join Filter: (mi.movie_id = t.id)
                                                   Buffers: shared hit=320311
                                                   ->  Nested Loop  (cost=9.36..3793.28 rows=1 width=57) (actual time=1.186..73.742 rows=7257.00 loops=1)
                                                         Output: chn.name, an.person_id, mk.movie_id, t.title, t.id, ci.movie_id, ci.person_id, mc.movie_id
                                                         Inner Unique: true
                                                         Buffers: shared hit=148020
                                                         ->  Nested Loop  (cost=8.94..3792.83 rows=1 width=61) (actual time=1.162..44.463 rows=28570.00 loops=1)
                                                               Output: chn.name, an.person_id, mk.movie_id, t.title, t.id, ci.movie_id, ci.person_id, mc.movie_id, mc.company_id
                                                               Join Filter: (mc.movie_id = t.id)
                                                               Buffers: shared hit=33740
                                                               ->  Nested Loop  (cost=8.51..3792.23 rows=1 width=53) (actual time=1.150..38.434 rows=1546.00 loops=1)
                                                                     Output: chn.name, an.person_id, mk.movie_id, t.title, t.id, ci.movie_id, ci.person_id
                                                                     Inner Unique: true
                                                                     Buffers: shared hit=25770
                                                                     ->  Nested Loop  (cost=8.08..3790.90 rows=2 width=41) (actual time=1.136..34.884 rows=1845.00 loops=1)
                                                                           Output: an.person_id, mk.movie_id, t.title, t.id, ci.movie_id, ci.person_id, ci.person_role_id
                                                                           Buffers: shared hit=19586
                                                                           ->  Nested Loop  (cost=7.66..3790.41 rows=1 width=37) (actual time=1.124..32.199 rows=1015.00 loops=1)
                                                                                 Output: mk.movie_id, t.title, t.id, ci.movie_id, ci.person_id, ci.person_role_id
                                                                                 Join Filter: (ci.role_id = rt.id)
                                                                                 Rows Removed by Join Filter: 2414
                                                                                 Buffers: shared hit=16540
                                                                                 ->  Seq Scan on public.role_type rt  (cost=0.00..1.15 rows=1 width=4) (actual time=0.009..0.011 rows=1.00 loops=1)
                                                                                       Output: rt.id, rt.role
                                                                                       Filter: ((rt.role)::text = 'actress'::text)
                                                                                       Rows Removed by Filter: 11
                                                                                       Buffers: shared hit=1
                                                                                 ->  Nested Loop  (cost=7.66..3789.19 rows=5 width=41) (actual time=0.129..32.030 rows=3429.00 loops=1)
                                                                                       Output: mk.movie_id, t.title, t.id, ci.movie_id, ci.person_id, ci.role_id, ci.person_role_id
                                                                                       Join Filter: (ci.movie_id = t.id)
                                                                                       Buffers: shared hit=16539
                                                                                       ->  Nested Loop  (cost=7.22..3767.31 rows=14 width=25) (actual time=0.108..9.105 rows=249.00 loops=1)
                                                                                             Output: mk.movie_id, t.title, t.id
                                                                                             Inner Unique: true
                                                                                             Buffers: shared hit=2966
                                                                                             ->  Nested Loop  (cost=6.79..3750.57 rows=34 width=4) (actual time=0.089..6.549 rows=414.00 loops=1)
                                                                                                   Output: mk.movie_id
                                                                                                   Buffers: shared hit=1310
                                                                                                   ->  Seq Scan on public.keyword k  (cost=0.00..2626.12 rows=1 width=4) (actual time=0.028..5.689 rows=1.00 loops=1)
                                                                                                         Output: k.id, k.keyword, k.phonetic_code
                                                                                                         Filter: (k.keyword = 'computer-animation'::text)
                                                                                                         Rows Removed by Filter: 134169
                                                                                                         Buffers: shared hit=949
                                                                                                   ->  Bitmap Heap Scan on public.movie_keyword mk  (cost=6.79..1121.40 rows=304 width=8) (actual time=0.061..0.830 rows=414.00 loops=1)
                                                                                                         Output: mk.id, mk.movie_id, mk.keyword_id
                                                                                                         Recheck Cond: (k.id = mk.keyword_id)
                                                                                                         Heap Blocks: exact=358
                                                                                                         Buffers: shared hit=361
                                                                                                         ->  Bitmap Index Scan on keyword_id_movie_keyword  (cost=0.00..6.71 rows=304 width=0) (actual time=0.033..0.033 rows=414.00 loops=1)
                                                                                                               Index Cond: (mk.keyword_id = k.id)
                                                                                                               Index Searches: 1
                                                                                                               Buffers: shared hit=3
                                                                                             ->  Index Scan using title_pkey on public.title t  (cost=0.43..0.49 rows=1 width=21) (actual time=0.006..0.006 rows=0.60 loops=414)
                                                                                                   Output: t.id, t.title, t.imdb_index, t.kind_id, t.production_year, t.imdb_id, t.phonetic_code, t.episode_of_id, t.season_nr, t.episode_nr, t.series_years, t.md5sum
                                                                                                   Index Cond: (t.id = mk.movie_id)
                                                                                                   Filter: ((t.production_year >= 2000) AND (t.production_year <= 2010))
                                                                                                   Rows Removed by Filter: 0
                                                                                                   Index Searches: 414
                                                                                                   Buffers: shared hit=1656
                                                                                       ->  Index Scan using movie_id_cast_info on public.cast_info ci  (cost=0.44..1.55 rows=1 width=16) (actual time=0.019..0.091 rows=13.77 loops=249)
                                                                                             Output: ci.id, ci.person_id, ci.movie_id, ci.person_role_id, ci.note, ci.nr_order, ci.role_id
                                                                                             Index Cond: (ci.movie_id = mk.movie_id)
                                                                                             Filter: (ci.note = ANY ('{(voice),"(voice: Japanese version)","(voice) (uncredited)","(voice: English version)"}'::text[]))
                                                                                             Rows Removed by Filter: 41
                                                                                             Index Searches: 249
                                                                                             Buffers: shared hit=13573
                                                                           ->  Index Only Scan using person_id_aka_name on public.aka_name an  (cost=0.42..0.47 rows=2 width=4) (actual time=0.002..0.002 rows=1.82 loops=1015)
                                                                                 Output: an.person_id
                                                                                 Index Cond: (an.person_id = ci.person_id)
                                                                                 Heap Fetches: 0
                                                                                 Index Searches: 1015
                                                                                 Buffers: shared hit=3046
                                                                     ->  Index Scan using char_name_pkey on public.char_name chn  (cost=0.43..0.67 rows=1 width=20) (actual time=0.002..0.002 rows=0.84 loops=1845)
                                                                           Output: chn.id, chn.name, chn.imdb_index, chn.imdb_id, chn.name_pcode_nf, chn.surname_pcode, chn.md5sum
                                                                           Index Cond: (chn.id = ci.person_role_id)
                                                                           Index Searches: 1546
                                                                           Buffers: shared hit=6184
                                                               ->  Index Scan using movie_id_movie_companies on public.movie_companies mc  (cost=0.43..0.54 rows=5 width=8) (actual time=0.001..0.002 rows=18.48 loops=1546)
                                                                     Output: mc.id, mc.movie_id, mc.company_id, mc.company_type_id, mc.note
                                                                     Index Cond: (mc.movie_id = mk.movie_id)
                                                                     Index Searches: 1546
                                                                     Buffers: shared hit=7970
                                                         ->  Index Scan using company_name_pkey on public.company_name cn  (cost=0.42..0.45 rows=1 width=4) (actual time=0.001..0.001 rows=0.25 loops=28570)
                                                               Output: cn.id, cn.name, cn.country_code, cn.imdb_id, cn.name_pcode_nf, cn.name_pcode_sf, cn.md5sum
                                                               Index Cond: (cn.id = mc.company_id)
                                                               Filter: ((cn.country_code)::text = '[us]'::text)
                                                               Rows Removed by Filter: 1
                                                               Index Searches: 28570
                                                               Buffers: shared hit=114280
                                                   ->  Index Scan using movie_id_movie_info on public.movie_info mi  (cost=0.43..1.56 rows=2 width=8) (actual time=0.005..0.020 rows=2.32 loops=7257)
                                                         Output: mi.id, mi.movie_id, mi.info_type_id, mi.info, mi.note
                                                         Index Cond: (mi.movie_id = mk.movie_id)
                                                         Filter: ((mi.info ~~ 'Japan:%200%'::text) OR (mi.info ~~ 'USA:%200%'::text))
                                                         Rows Removed by Filter: 215
                                                         Index Searches: 7257
                                                         Buffers: shared hit=172291
                                             ->  Seq Scan on public.info_type it  (cost=0.00..2.41 rows=1 width=4) (actual time=0.001..0.001 rows=1.00 loops=16815)
                                                   Output: it.id, it.info
                                                   Filter: ((it.info)::text = 'release dates'::text)
                                                   Rows Removed by Filter: 15
                                                   Buffers: shared hit=16815
                                       ->  Index Scan using name_pkey on public.name n  (cost=0.43..0.78 rows=1 width=19) (actual time=0.001..0.001 rows=0.04 loops=16815)
                                             Output: n.id, n.name, n.imdb_index, n.imdb_id, n.gender, n.name_pcode_cf, n.name_pcode_nf, n.surname_pcode, n.md5sum
                                             Index Cond: (n.id = ci.person_id)
                                             Filter: ((n.name ~~ '%An%'::text) AND ((n.gender)::text = 'f'::text))
                                             Rows Removed by Filter: 1
                                             Index Searches: 16815
                                             Buffers: shared hit=67260
                                 ->  Index Scan using movie_id_complete_cast on public.complete_cast cc  (cost=0.42..0.46 rows=2 width=12) (actual time=0.001..0.001 rows=0.74 loops=665)
                                       Output: cc.id, cc.movie_id, cc.subject_id, cc.status_id
                                       Index Cond: (cc.movie_id = t.id)
                                       Index Searches: 665
                                       Buffers: shared hit=2489
                     ->  Seq Scan on public.comp_cast_type cct2  (cost=0.00..1.05 rows=1 width=4) (actual time=0.000..0.000 rows=1.00 loops=494)
                           Output: cct2.id, cct2.kind
                           Filter: ((cct2.kind)::text = 'complete+verified'::text)
                           Rows Removed by Filter: 3
                           Buffers: shared hit=494
               ->  Index Scan using person_id_person_info on public.person_info pi  (cost=0.43..1.11 rows=25 width=8) (actual time=0.001..0.020 rows=358.87 loops=189)
                     Output: pi.id, pi.person_id, pi.info_type_id, pi.info, pi.note
                     Index Cond: (pi.person_id = an.person_id)
                     Index Searches: 189
                     Buffers: shared hit=2511
 Planning:
   Buffers: shared hit=1209
 Planning Time: 40.670 ms
 Execution Time: 270.615 ms
(173 rows)

