Finalize Aggregate (cost=54179.01..54179.02 rows=1 width=68) -> Gather (cost=54178.79..54179.00 rows=2 width=68) Workers Planned: 2 -> Partial Aggregate (cost=53178.79..53178.80 rows=1 width=68) -> Nested Loop (cost=37881.27..53178.44 rows=46 width=45) Join Filter: (mc.movie_id = t.id) -> Parallel Hash Join (cost=37880.84..53151.28 rows=46 width=32) Hash Cond: (mi_idx.movie_id = mc.movie_id) -> 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) -> Parallel Hash (cost=37855.54..37855.54 rows=1830 width=28) -> Hash Join (cost=1.06..37855.54 rows=1830 width=28) Hash Cond: (mc.company_type_id = ct.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)::tex t ~~ '%(presents)%'::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)