QUERY PLAN
Hash Left Join (cost=275.22..29923.12 rows=642 width=52)
Hash Cond: (ca.engineer_id = egr.engineer_id)
-> Hash Join (cost=273.61..29912.69 rows=642 width=52)
Hash Cond: (ca.case_id = c.id)
-> Seq Scan on tbl_case_assignments ca (cost=0.00..29630.86 rows=3129 width=52)
Filter: (case_id = ANY ('{5063,5036,5197,4971,4668,5259,4758,4766,5037,5217,5198,5138,5120,4972,4804,4433,4863,4853,4901,4932,4944,4695,4959,5199,4997,5083,4706,4744,4794,4864,4854,4908,4902,4960,5022,5123,5243,4925,4628,4696,4684,4760,4745,4768,24,4961,4987,5200,5105,5052,5244,4855,4878,4946,4909,4685,5041,5024,5106,5068,5053,5184,5163,4988,5221,5245,4769,4761,4856,4826,4796,4807,1866,4892,4910,4947,4672,4928,5054,4867,5185,5042,5246,5164,5265,4963,5016,5222,4647,4709,4722,4747,4762,4797,4905,5002,4990,5223,5108,5247,5087,4964,5070,4936,4663,4723,4748,4763,4798,5044,5248,5088,4991,5018,4912,4929,4937,4594,4664,4649,4700,4674,4772,4749,4764,4810,4785,4848,4859,5167,5144,4980,5072,5057,5128,5089,5188,5268,5249,4930,4913,4633,4701,4800,4981,5005,4993,5090,4967,5145,5206,5250,4849,4914,4860,4931,4651,4713,4751,5006,5074,5047,4982,5130,4896,5190,5207,4952,4635,4727,4752,4802,4953,5075,25,3783,3745,5113,5251,4916,4941,4611,4636,4803,4753,4942,5061,4754,4943,4680,4717,4791,4778,4888,4875,4900,4656,4639,4792,5008,5114,5132,4640,4615,4757,2043,44,4237,3437,4501,4339,4358,4384,3462,3452,3474,3471,5009,5077,5094,4641,5034,4838,3468,3466,3473,3470,3472,3502,3516,3492,4398,4414,4424,4450,4458,3489,3482,3479,3477,3508,3490,3481,3491,5095,4225,3499,4360,4374,4415,4425,4459,4436,3512,3518,3486,3500,3505,3507,3513,3506,3515,3511,4840,3521,3519,3906,3538,3539,4474,4504,4361,4400,4375,3568,3535,3542,3560,3541,3529,3553,3565,4841,3534,3549,4341,4475,4505,4376,4346,4362,4417,4453,4461,3526,3525,3544,3551,3555,3550,3556,3559,3566,3564,3827,3558,3571,3562,3575,3567,3554,3589,3588,4389,4363,4377,4439,4418,4428,1997,2027,2110,2068,2132,2265,2275,2292,4378,4390,4507,4440,2411,2468,2489,4104,1819,1849,1953,4349,4508,4404,4420,4441,4464,4430,2028,2111,2163,2171,2276,2293,20,2344,2356,2412,4509,4405,4442,4431,4465,2390,2448,2469,1756,3097,1797,2045,4381,4406,4367,21,4466,2055,2172,2189,2215,2249,2239,2277,2318,2294,2357,2391,2429,2491,2531,1739,4394,1809,1900,1955,2022,1994,2149,2216,2201,2173,2240,2268,4408,4445,4468,2278,2228,2414,2295,2346,2319,2471,4070,2492,1979,4131,1799,1966,1929,4354,4446,4409,4469,2072,2047,2166,1956,2174,2347,2279,2320,2393,2296,2431,5116,4355,4447,1800,1889,1967,22,2032,2073,2128,2192,2270,2242,2252,2280,2375,2432,1,2551,1775,1801,4071,23,1903,2003,4072,2089,2059,2116,2219,2349,2453,2474,2515,1743,1776,1802,1855,3696,1891,1904,2090,2177,2194,2254,2299,2272,2418,2396,2434,2535,2587,1744,1732,1856,1892,2118,2195,2178,2255,2300,2419,2476,1827,1815,1906,2284,2222,2179,2234,2274,2325,2301,2420,2352,2436,2477,1734,4074,1907,1972,3686,2180,2235,2223,2365,2302,2353,2421,2457,1788,1869,47,2209,2181,2224,2236,2286,2303,2520,1748,1789,2259,2287,2401,2521,2585,1883,1988,2081,2159,2402,2368,2559,2577,2591,1750,1989,2067,2082,2461,2523,2578,2542,3687,1912,1990,2442,2462,2579,2524,2543,1752,1949,3330,2525,1846,2506,3797,2387,1847,2595,3722,2388,2465,2445,2528,2583,2598,2410,16,17,3788,34,35,1705,38,51,53,54,55,56,57,58,59,60,61,62,64,67,69,74,76,77,78,79,80,81,82,83,84,85,87,91,99,102,105,106,108,109,110,122,123,125,129,134,4160,150,172,177,179,181,189,190,191,194,214,219,248,249,253,260,261,266,267,270,273,275,278,279,280,281,282,283,284,286,289,292,294,295,302,4136,308,311,312,4159,4288,325,329,4112,337,3699,350,351,352,353,354,355,356,357,358,360,4081,3704,365,367,371,372,4177,4137,4158,386,387,390,392,4215,4232,3690,4244,398,403,405,411,413,434,437,439,4138,459,468,469,470,4211,473,480,486,490,495,505,507,509,4139,524,525,528,537,541,5115,556,557,561,577,579,582,587,588,589,590,591,594,595,4140,3826,4163,3780,621,623,624,626,629,3789,631,635,643,644,648,650,653,654,655,659,663,4085,669,671,4116,673,675,676,677,688,3706,697,702,703,4086,711,714,717,719,723,4142,732,735,736,737,751,4185,770,718,771,772,774,781,4087,4118,798,4166,4143,810,817,840,4214,4229,3844,4088,3688,863,867,868,4119,891,893,894,898,901,909,911,912,917,920,3707,4167,923,928,931,932,941,942,943,4089,949,950,952,956,957,958,962,964,3779,967,970,979,981,983,985,992,993,994,3703,997,999,4090,1015,1016,1020,1021,1022,1023,1025,1027,1028,1029,1030,1031,3719,3793,1037,1039,1040,1041,1042,1043,1044,4146,1054,1059,1060,1061,1062,1063,4168,1069,1073,1074,1075,1076,1077,1080,1081,4091,1087,1088,1089,1091,2730,1093,1094,1097,1098,1099,1102,1103,1109,1110,1112,1113,1119,1120,3801,1122,1127,1128,1129,1130,1138,1142,4213,1146,1147,1153,1154,1160,1161,1165,1169,4092,4123,1179,1182,1184,1185,1186,1187,1188,1189,1197,1201,1202,1204,1208,1209,1210,1215,1218,4235,1230,1236,1239,1241,1242,1243,1244,1257,1259,1260,1262,1264,1265,1267,1268,1272,1274,1276,1292,1294,1295,1298,1301,1303,1308,1309,1311,1312,1315,1317,1318,1320,1321,1322,1323,1324,1325,1328,1330,1334,1335,1336,1338,1339,1340,1347,1354,1355,1356,1357,1358,1364,1365,1367,3790,1372,1374,1376,4094,4125,1387,1395,1396,1397,1398,1399,1400,1403,1405,1414,1415,1420,1421,1425,1426,1427,1436,1439,1443,1444,4172,1447,1449,1450,1455,1460,1473,1899,1479,1481,1483,1495,2916,1502,1504,1506,1507,1517,1519,1520,1528,3689,4500,1537,1550,1551,1552,1572,1583,1585,1588,5096,1592,4097,1632,1633,1640,1643,1649,1653,1771,4152,4174,1656,1666,1668,3822,1674,3702,4221,4231,1677,1685,1689,1691,4128,1706,4098,1712,1701,5230,1722,1720,3772,2592,2594,2610,2603,2611,4153,4194,4212,2622,2648,2620,2617,2614,2616,2618,2619,2612,2625,2613,2651,2642,2638,2640,2639,2630,2631,2628,2629,3409,2641,2658,2659,2670,2681,2678,2668,2660,3794,2682,2661,2679,2677,2671,2674,2687,2700,2694,4099,2707,2695,2696,2701,3792,2709,2719,2736,2729,2720,2722,2712,2723,2742,2718,2727,2732,2738,4100,2726,2725,4196,2744,2739,4129,2747,2758,2759,2743,2754,2753,2760,2761,3799,2799,2769,2770,2768,2771,2779,2772,2800,2763,2788,2773,2794,2802,2780,2785,2803,2776,2786,2781,2782,2795,2807,2801,2789,2806,2790,2842,2840,2837,2814,2832,2839,2815,2816,2851,2828,2822,2827,2823,2860,2833,2847,2849,2856,2853,2845,2838,2843,2855,2841,2858,2852,2859,2854,2846,2887,2878,2870,3773,2861,2864,2879,2903,2896,2895,2893,2889,2912,2910,2897,2911,3824,2932,4208,2944,2964,2935,2933,2915,2919,2918,2937,2927,2959,2943,2949,2928,2934,2926,2938,3075,2956,2920,2957,2946,2955,2947,3595,3012,3000,2977,2985,2974,2984,2966,2983,3840,2982,2965,2971,2991,2968,2990,2981,2986,2976,2987,2999,2975,3010,3009,3005,2980,3038,3026,3027,3047,3065,3050,3031,3032,3029,3028,3046,3020,3043,3035,3019,3015,3057,3033,3045,3044,3030,3054,3063,3051,3052,3059,3056,3055,4297,3049,3070,3099,3067,3076,3081,3068,3079,3073,3071,3078,3086,3080,3082,3077,3095,3094,3120,834,744,3149,3134,3231,4338,4383,4422,3401,5234,5254,4502,4423,3469,4340,5195,5100,5252,5233,5196,5255,5210,5229,5211,5256,5212,5178,5179,5258,5239,252,1004,1072,1422,2705,2791,2904,3176,3191,3169,3192,4176,3265,3230,3266,3229,3384,3284,3273,3289,3283,3274,3292,3278,3305,3308,3307,3304,3296,3293,3303,3302,3320,3309,3402,3325,3321,3337,3345,3339,3336,3335,3332,3327,3333,3346,3344,3353,3341,3340,3347,3360,3349,3366,3361,3348,3365,3364,3368,3370,3851,3389,3374,3383,4240,4224,3372,3394,3391,3791,3408,1754,4069,3436,3434,3426,3461,3465,3450,3453,4491,4493,1898,1976,4584,3787,4498,2258,2315,1749,359,4190,4197,2787,3130,3123,3326,3399,3425,3379,3922,3382,3390,3843,3378,2248,4103,4075,2467,4115,4120,4121,2909,3271,3454,3536,3533,3561,4294,3979,4326,3398,3395,3393,4199,3407,3580,3600,3576,3579,3597,3578,3583,3577,3582,3581,3596,3584,3610,3598,3591,3609,3617,3599,3620,3606,3592,3590,3603,3608,3611,3615,3614,3613,3624,3618,3622,3621,3701,3632,3649,3630,3625,3659,3629,3647,3640,3663,4203,3637,3636,4227,3644,3651,3646,3639,3666,3655,3673,3665,3664,3657,3650,3674,3668,3667,3678,4241,3713,3675,3681,4306,3700,3695,3691,3683,3682,3679,3737,4293,3715,4198,3743,3714,4284,3742,4311,3723,3741,3724,3709,3705,3708,3739,3738,3750,4299,3749,3751,3748,3744,3754,3819,3776,3753,3795,3807,3813,3806,3892,3825,3829,3834,3837,3853,3839,3856,3876,3858,3886,3860,3868,4300,3874,3866,3862,3870,3872,3864,3891,3890,3888,3897,3887,3895,3893,3894,3896,3898,3759,4228,3767,3764,3861,3761,3758,3821,3760,3768,3817,3766,3863,3762,3796,3756,3755,3763,3828,3757,3765,3830,3838,3875,3867,3871,3865,3854,3879,3855,3859,3881,3869,3885,3900,3899,3903,3902,3901,3904,3939,3942,3947,4178,3913,3912,3914,3911,3929,3927,3923,3941,3938,3937,3958,3976,3986,3997,3966,3988,3970,3968,3972,3971,4206,3974,3975,3987,3980,3989,3996,3998,4000,3994,4009,4025,4042,4017,4001,4028,4005,4027,4026,4014,5477,4044,4021,4004,4015,4019,4023,4008,4003,4007,4031,4018,4020,4002,4006,4048,4024,4010,4022,4029,4033,4034,4047,4041,4037,4036,4030,4046,4038,4043,4045,4065,4068,4319,4064,4067,4051,4058,4056,4207,4230,4050,4061,4309,4059,4314,4321,4296,4308,4316,4310,4298,4320,4330,4325,4327,4337,4336,4513,4520,4522,4529,4544,4543,4557,4532,4549,4548,4535,4554,5602,4558,4560,4571,4563,4562,4561,4593,4591,4573,4599,4580,4582,4592,4581,4578,4598,4590,4600,4595,4589,5284,5272,5271,5287,5316,5304,5295,5324,5319,5294,5298,5310,5308,5309,5315,5317,5297,5325,5331,5332,5270,5334,5353,5348,5350,5358,5371,5351,5357,5364,5345,5349,5363,5369,5378,5377,5370,5343,5419,5388,5398,5397,5381,5384,5380,5385,5389,5411,5395,5425,5393,5410,5420,5412,5418,5403,5404,5423,5426,5453,5429,5428,5430,5431,5434,5459,5456,5450,5457,5433,5462,5451,5480,5479,5478,5484,5475,5495,5487,5504,5496,5497,5515,5514,5485,5474,5526,5527,5521,5528,5536,5520,5549,5540,5531,5529,5537,5543,5542,5545,5547,5548,5532,5550,5578,5565,5574,5572,5566,5575,5576,5577,5568,5587,5580,5603,5579,5586,5604,5645,5629,5633,5614,5623,5622,5628,5631,5636,5638,5637,5644,5641,5650,5649,5651,5653,5661,5671,5662,5656,5667,5668,5657,5654,5664,5663,5658,5678,5694,5695,5706,5715,5716,5729,5717,5718,5730,5722,5724,5731,5734,5726,5733,5735,5736,5738,5739,5757,5753,5759,5777,5768,5761,5778,5776,5775,5769,5783,5784,5786,6460,5791,5787,5780,5795,5781,5782,5806,5802,5801,5812,5815,5817,5820,5816,5831,5848,5845,5823,5843,5847,5833,5832,5842,5830,5841,5846,5840,5853,5849,5861,5858,5859,5864,5888,5865,5868,5874,5895,5879,5875,5878,5885,5872,5907,5898,6748,5914,5911,5910,5927,5934,5936,5912,5968,5963,5947,5969,5964,5976,5971,5970,5992,5999,5990,5997,6004,5991,5980,6008,6015,6013,6045,6047,6042,6038,6048,6035,6026,6025,6033,6032,6024,6040,6027,6039,6028,6016,6034,6056,6057,6185,6052,6062,6076,6097,6066,6073,6068,6088,6059,6058,6071,6069,6064,6075,6074,6078,6072,6091,6087,6096,6113,6115,6128,6119,6117,6103,6123,6114,6173,6105,6104,6081,6101,6110,6111,6125,6112,6130,6134,6133,6140,6124,6138,6137,6160,6151,6141,6147,6153,6142,6143,6155,6149,6154,6167,6145,6156,6170,6148,6174,6166,6165,6172,6161,6163,6169,6171,6178,6168,6177,6175,6146,6183,6179,6193,6196,6194,6206,6201,6182,6191,6192,6190,6189,6195,6197,6198,6210,6211,6208,6207,6205,6219,6217,6222,6220,6184,6176,6186,6235,6236,6246,6231,6237,6238,6239,6232,6263,6249,6242,6244,6247,6250,6255,6258,6259,6261,6251,6304,6283,6288,6282,6305,6275,6274,6272,6271,6273,6285,6292,6293,6296,6267,6287,6299,6311,6325,6332,6334,6313,6314,6312,6310,6318,6317,6316,6322,6323,6324,6339,6321,6320,6344,6343,6347,6356,6364,6366,6355,6376,6385,6386,6387,6383,6413,6389,6391,6393,6394,6420,6422,6404,6417,6403,6402,6428,6416,6459,6446,6431,6458,6448,6454,6463,6452,6457,6468,6461,6462,6467,6477,6487,6502,6497,6486,6493,6469,6475,6470,6498,6489,6483,6488,6505,6473,6500,6506,6518,6541,6524,6527,6511,6528,6513,6531,6521,6526,6544,6540,6537,6536,6535,6545,6546,6538,6539,6542,6547,6551,6560,6555,6554,6553,6564,6577,6572,6571,6556,6585,6567,6591,6566,6576,6568,6587,6584,6581,6597,6582,6590,6574,6578,6579,6573,6594,6592,6580,6583,6575,6628,6626,6599,6608,6609,6565,6600,6601,6606,6621,6603,6605,6607,6610,6625,6615,6619,6623,6632,6630,6635,6641,6640,6672,6656,6657,6650,6659,6669,6651,6658,6643,6652,6648,6667,6660,6662,6674,6677,6664,6671,6679,6663,6668,6678,6670,6684,6681,6694,6714,6712,6710,6699,6687,6690,6695,6696,6691,6702,6700,6692,6703,6697,6709,6701,6705,6721,6711,6730,6726,6728,6737,6739,6735,6738,6755,6754,6750,6768,6753,6758,6756,6760,6773,6774,6784,6785,6813,6798,6793,6812,6800,6802,6809,6808,6816,6810,6817,6849,6835,6842,6827,6841,6831,6824,6837,6857,6846,6844,6848,6850,6855,6852,6859,6862,6858,6856,6871,6873,6863,6869,6868,6870,6893,6875,6874,6879,6872,6891,6904,6903,6898,6877,6909,6912,6919,6905,6925,6924,6920,6929,6943,6949,6945,6967,6975,6981,6976,6958,6956,6979,6965,6966,6985,6954,6984,6993,7018,7029,7021,6999,6998,7013,7002,7032,7008,7022,7052,7045,7048,7046,7067,7051,7049,7055,7056,7069,7073,7082,7086,7104,7080,7098,7090,7094,7102,7101,7112,7113,7129,7119,7135,7165,7156,7145,7148,7155,7151,7140,7171,7158,7163,7169,7214,7173,7190,7178,7183,7193,7177,7180,7209,7205,7194,7207,7206,7210,7191,7230,7235,7225,7238,7222,7240,7226,7219,7257,7220,7242,7248,7236,7250,7234,7262,7299,7246,7247,7245,7241,7244,7260,7253,7251,7261,7255,7254,7273,7274,7277,7264,7263,7265,7131,7239,7267,7269,7290,7286,7275,7276,7289,7294,7283,7285,7292,7295,7291,7313,7334,7293,7308,7306,7307,7329,7319,7318,7332,7342,7330,7343,7335,7328,7338,7333,7327,7344,7346,7349,7364,7354,7353,7359,7377,7360,7366,7372,7376,7373,7355,7356,7375,7368,7370,7369,7374,7365,7380,7381,7379,7363,7371,7382,7386,7394,7385,7392,7393,7426,7410,7416,7418,7434,7403,7396,7401,7405,7415,7406,7404,7408,7409,7428,7419,7397,7398,7437,7414,7432,7422,7420,7424,7430,7440,7421,7431,7433,7439,7438,7427,7444,7457,7460,7452,7423,7445,7450,7448,7447,7451,7465,7449,7455,7454,7462,7461,7458,7443,7466,7472,7473,7484,7482,7475,7526,7488,7490,7489,7478,7499,7487,7513,7493,7485,7501,7500,7502,7503,7518,7512,7520,7522,7505,7504,7496,7495,7517,7525,7548,7538,7552,7536,7568,7537,7521,7534,7544,7553,7542,7546,7565,7547,7564,7561,7569,7567,7535,7594,7580,7606,7573,7588,7591,7582,7592,7598,7600,7596,7593,7607,7589,7590,7605,7611,7610,7613,7629,7621,7628,7635,7619,7620,7650,7642,7632,7634,7637,7643,7645,7626,7639,7641,7638,7640,7627,7651,7636,7545,7674,7599,7614,7677,7662,7691,7665,7672,7675,7682,7670,7663,7671,7664,7660,7680,7688,7683,7700,7704,7695,7706,7699,7707,7710,7713,7717,7731,7723,7718,7716,7733,7728,7732,7724,7693,7719,7741,7751,7734,7742,7768,7743,7757,7748,7754,7756,7758,7749,7762,7738,7739,7775,7750,7740,7755,7764,7771,7766,7791,7795,7803,7796,7777,7781,7780,7799,7798,7782,7788,7785,7784,7801,7810,7789,7814,7802,7792,7809,7811,7812,7808,7815,7813,7838,7822,7834,7827,7828,7818,7821,7829,7832,7833,7843,7835,7820,7819,7848,7853,7840,7839,7851,7847,7852,7850,7855,7859,7849,7830,7842,7841,7831,7858,7857,7856,7860,7878,7879,7881,7875,7873,7865,7866,7886,7868,7869,7867,7870,7861,7862,7863,7864,7871,7872,7902,7887,7892,7874,7876,7877,7883,7884,7882,7889,7888,7894,7896,7893,7900,7895,7899,7907,7930,7905,7910,7911,7926,7906,7940,7916,7937,7933,7941,7943,7934,7938,7939,7942,7990,7946,7979,7975,7963,7984,7962,7948,7947,7956,7980,7967,7961,7965,7959,7978,8014,7989,8008,7988,7992,7993,8010,8007,8021,7995,8006,7997,7998,8017,8002,8001,8011,8015,8013,8024,8022,8028,8030,8033,8034,8038,8036,8039,8040,8060,8037,8042,8041,8053,8066,8054,8068,8061,8049,8051,8047,8058,8069,8063,8071,8067,8086,8106,8103,8100,8098,8074,8077,8078,8087,8085,8095,8107,8102,8099,8108,8111,8115,8110,8131,8138,8128,8145,8123,8130,8149,8124,8120,8148,8122,8135,8154,8141,8121,8152,8151,8150,8195,8186,8161,8162,8199,8189,8170,8172,8174,8173,8180,8190,8197,8194,8182,8183,8191,8188,8196,8205,8229,8214,8230,8232,8222,8235,8245,8224,8206,8231,8209,8225,8228,8238,8250,8248,8251,8252,8215,8249,8257,8256,8246,7807}'::integer[]))
-> Hash (cost=254.28..254.28 rows=1547 width=4)
-> Seq Scan on tbl_cases c (cost=0.00..254.28 rows=1547 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)