Finalize Aggregate (cost=54190.12..54190.13 rows=1 width=68) -> Gather (cost=54189.90..54190.11 rows=2 width=68) Workers Planned: 2 -> Partial Aggregate (cost=53189.90..53189.91 rows=1 width=68) -> Nested Loop (cost=15318.71..53189.55 rows=46 width=45) Join Filter: (mc.movie_id = t.id) -> Hash Join (cost=15318.28..53162.39 rows=46 width=32) Hash Cond: (mc.company_type_id = ct.id) -> Parallel Hash Join (cost=15317.21..53160.33 rows=185 width=36) Hash Cond: (mc.movie_id = mi_idx.movie_id) -> Parallel Seq Scan on movie_companies mc (cost=0.00..37814.90 rows=7320 width=32) Filter: (((note)::text !~~ '%(as Metro-Goldwyn-Mayer Pictures)%'::text) AND (((note)::text ~~ '%(co-production)%'::text) OR ((note)::text ~~ ' %(presents)%'::text))) -> Parallel Hash (cost=15253.60..15253.60 rows=5089 width=4) -> Hash Join (cost=2.43..15253.60 rows=5089 width=4) Hash Cond: (mi_idx.info_type_id = it.id) -> Parallel Seq Scan on movie_info_idx mi_idx (cost=0.00..13685.15 rows=575015 width=8) -> Hash (cost=2.41..2.41 rows=1 width=4) -> Seq Scan on info_type it (cost=0.00..2.41 rows=1 width=4) Filter: ((info)::text = 'top 250 rank'::text) -> Hash (cost=1.05..1.05 rows=1 width=4) -> Seq Scan on company_type ct (cost=0.00..1.05 rows=1 width=4) Filter: ((kind)::text = 'production companies'::text) -> Index Scan using title_pkey on title t (cost=0.43..0.58 rows=1 width=25) Index Cond: (id = mi_idx.movie_id)