QUERY PLAN
Hash Left Join (cost=289.98..2172.57 rows=35 width=52)
Hash Cond: (ca.engineer_id = egr.engineer_id)
-> Hash Join (cost=288.38..2170.48 rows=35 width=52)
Hash Cond: (ca.case_id = c.id)
-> Seq Scan on tbl_case_assignments ca (cost=0.00..1881.65 rows=173 width=52)
Filter: (case_id = ANY ('{4705,4728,4996,4659,4985,4604,4619,5039,5051,4707,4730,4975,4605,4661,4606,4662,5001,5069,4699,4710,5027,4724,2783,4712,2874,2811,4665,4689,4725,2862,4476,4676,5030,2936,4637,4654,2988,2891,4653,4638,3092,4623,4616,4624,3480,4625,4642,4473,2010,1925,2123,2162,2225,2247,2316,2304,2328,2510,2511,2330,2470,1978,2000,2190,4488,2472,2058,2297,2394,2138,2168,2176,2231,2322,2376,2395,2552,2335,2311,2496,1941,2283,2455,2363,2207,2456,1985,2326,2338,2104,2157,2339,2340,2459,2260,2341,2440,2424,2522,1911,2261,2403,2384,2441,2425,2482,2404,2426,2593,2463,2485,2406,2507,2407,2596,2408,2530,2606,2621,2615,2626,2693,2662,2704,2784,2810,2808,2812,2821,2804,2805,2905,2902,2884,2907,2906,2958,3008,3001,3017,1964,3096,3108,2439,3355,4492,2464,3416,2818,3628,3833,6060,6061,6083,6089,6090,6084,6094,6095,6098,6109,6102,6400,6405,6409,6408,6395,6433,6434,6543,7722,8101}'::integer[]))
-> Hash (cost=268.29..268.29 rows=1607 width=4)
-> Seq Scan on tbl_cases c (cost=0.00..268.29 rows=1607 width=4)
Filter: (case_type = 1)
-> Hash (cost=1.27..1.27 rows=27 width=4)
-> Seq Scan on tbl_engineer_group_relationships egr (cost=0.00..1.27 rows=27 width=4)