"Unique (cost=266348.42..272953.14 rows=528378 width=32) (actual time=2259.262..2662.097 rows=88244 loops=1)" " -> Sort (cost=266348.42..267669.36 rows=528378 width=32) (actual time=2259.258..2417.291 rows=88244 loops=1)" " Sort Key: production.company.id, production.company.id, production.company.run_id, production.company.run_id" " Sort Method: external merge Disk: 4128kB" " -> Append (cost=49771.10..190838.89 rows=528378 width=32) (actual time=1080.083..2024.480 rows=88244 loops=1)" " -> Hash Join (cost=49771.10..88028.96 rows=2403 width=32) (actual time=1080.080..1285.869 rows=53495 loops=1)" " Hash Cond: ((production.company.name)::text = (s2.name)::text)" " -> Nested Loop (cost=1183.27..39219.67 rows=52648 width=30) (actual time=1.949..68.977 rows=15507 loops=1)" " -> HashAggregate (cost=1.55..1.56 rows=1 width=8) (actual time=0.027..0.029 rows=1 loops=1)" " -> Seq Scan on run (cost=0.00..1.55 rows=1 width=8) (actual time=0.012..0.013 rows=1 loops=1)" " Filter: ((name)::text = 'test'::text)" " -> Bitmap Heap Scan on company (cost=1181.72..38435.51 rows=62608 width=30) (actual time=1.913..25.456 rows=15507 loops=1)" " Recheck Cond: ((production.company.run_id)::bigint = production.run.id)" " -> Bitmap Index Scan on comp_run (cost=0.00..1166.07 rows=62608 width=0) (actual time=1.818..1.818 rows=15507 loops=1)" " Index Cond: ((production.company.run_id)::bigint = production.run.id)" " -> Hash (cost=48471.98..48471.98 rows=9268 width=44) (actual time=1077.956..1077.956 rows=45091 loops=1)" " -> Hash Join (cost=8826.52..48471.98 rows=9268 width=44) (actual time=757.742..987.008 rows=45091 loops=1)" " Hash Cond: ((production.company.name)::text = ((s1.name)::text))" " -> Nested Loop (cost=1183.27..39376.19 rows=52648 width=30) (actual time=1.785..79.869 rows=15507 loops=1)" " -> HashAggregate (cost=1.55..1.56 rows=1 width=8) (actual time=0.015..0.018 rows=1 loops=1)" " -> Seq Scan on run (cost=0.00..1.55 rows=1 width=8) (actual time=0.008..0.010 rows=1 loops=1)" " Filter: ((name)::text = 'test'::text)" " -> Bitmap Heap Scan on company (cost=1181.72..38592.03 rows=62608 width=30) (actual time=1.763..30.764 rows=15507 loops=1)" " Recheck Cond: ((production.company.run_id)::bigint = production.run.id)" " Filter: ((production.company.status)::text = 'unprocessed'::text)" " -> Bitmap Index Scan on comp_run (cost=0.00..1166.07 rows=62608 width=0) (actual time=1.679..1.679 rows=15507 loops=1)" " Index Cond: ((production.company.run_id)::bigint = production.run.id)" " -> Hash (cost=6951.43..6951.43 rows=35745 width=28) (actual time=755.771..755.771 rows=35745 loops=1)" " -> Unique (cost=6683.34..6951.43 rows=35745 width=28) (actual time=520.778..689.501 rows=35745 loops=1)" " -> Sort (cost=6683.34..6772.71 rows=35745 width=28) (actual time=520.774..589.872 rows=35745 loops=1)" " Sort Key: ((s1.name)::text), ((s2.name)::text)" " Sort Method: external merge Disk: 2064kB" " -> Hash Join (cost=928.57..3122.55 rows=35745 width=28) (actual time=92.883..375.943 rows=35745 loops=1)" " Hash Cond: ((atom_match.atom1_id)::integer = s1.id)" " -> Hash Join (cost=445.80..1880.19 rows=35745 width=18) (actual time=45.651..212.089 rows=35745 loops=1)" " Hash Cond: ((atom_match.atom2_id)::integer = s2.id)" " -> Seq Scan on atom_match (cost=0.00..674.81 rows=35745 width=8) (actual time=0.006..54.235 rows=35745 loops=1)" " Filter: ((match_function_id)::integer = 2)" " -> Hash (cost=260.91..260.91 rows=14791 width=18) (actual time=45.627..45.627 rows=14791 loops=1)" " -> Seq Scan on atoms_string s2 (cost=0.00..260.91 rows=14791 width=18) (actual time=0.005..21.782 rows=14791 loops=1)" " -> Hash (cost=297.89..297.89 rows=14791 width=18) (actual time=47.219..47.219 rows=14791 loops=1)" " -> Seq Scan on atoms_string s1 (cost=0.00..297.89 rows=14791 width=18) (actual time=0.007..22.375 rows=14791 loops=1)" " Filter: ((atom_type_id)::integer = (-1))" " -> Merge Join (cost=89373.23..97526.15 rows=525975 width=32) (actual time=237.562..498.501 rows=34749 loops=1)" " Merge Cond: ((production.company.name)::text = (production.company.name)::text)" " -> Sort (cost=44764.87..44896.49 rows=52648 width=30) (actual time=120.482..147.512 rows=15507 loops=1)" " Sort Key: production.company.name" " Sort Method: external merge Disk: 704kB" " -> Nested Loop (cost=1183.27..39376.19 rows=52648 width=30) (actual time=1.919..72.063 rows=15507 loops=1)" " -> HashAggregate (cost=1.55..1.56 rows=1 width=8) (actual time=0.034..0.037 rows=1 loops=1)" " -> Seq Scan on run (cost=0.00..1.55 rows=1 width=8) (actual time=0.020..0.022 rows=1 loops=1)" " Filter: ((name)::text = 'test'::text)" " -> Bitmap Heap Scan on company (cost=1181.72..38592.03 rows=62608 width=30) (actual time=1.869..29.107 rows=15507 loops=1)" " Recheck Cond: ((production.company.run_id)::bigint = production.run.id)" " Filter: ((production.company.status)::text = 'unprocessed'::text)" " -> Bitmap Index Scan on comp_run (cost=0.00..1166.07 rows=62608 width=0) (actual time=1.771..1.771 rows=15507 loops=1)" " Index Cond: ((production.company.run_id)::bigint = production.run.id)" " -> Materialize (cost=44608.35..45266.45 rows=52648 width=30) (actual time=117.069..217.735 rows=34749 loops=1)" " -> Sort (cost=44608.35..44739.97 rows=52648 width=30) (actual time=117.062..144.027 rows=15507 loops=1)" " Sort Key: production.company.name" " Sort Method: external merge Disk: 704kB" " -> Nested Loop (cost=1183.27..39219.67 rows=52648 width=30) (actual time=1.887..68.266 rows=15507 loops=1)" " -> HashAggregate (cost=1.55..1.56 rows=1 width=8) (actual time=0.024..0.026 rows=1 loops=1)" " -> Seq Scan on run (cost=0.00..1.55 rows=1 width=8) (actual time=0.013..0.015 rows=1 loops=1)" " Filter: ((name)::text = 'test'::text)" " -> Bitmap Heap Scan on company (cost=1181.72..38435.51 rows=62608 width=30) (actual time=1.851..24.648 rows=15507 loops=1)" " Recheck Cond: ((production.company.run_id)::bigint = production.run.id)" " -> Bitmap Index Scan on comp_run (cost=0.00..1166.07 rows=62608 width=0) (actual time=1.764..1.764 rows=15507 loops=1)" " Index Cond: ((production.company.run_id)::bigint = production.run.id)" "Total runtime: 2797.311 ms"