#6
⏱️ 20.03 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[7529293,7493489,7182537,6744655,6708345,4039359,3887679,3876067,3679020,3677696,3676089,3673474,3580503,3579307,3574922,3562691,3328776,3170808,3119358,3068182,3067885,3065978,3052772,2996211,2986223,2975667,2975219,2974530,2903796,2896664,2877891,2812735,1462716,123050,3041110,160427,2812826,1959667,109696,194993,193908,154945,133500,1458061,1909941,1930007,205836,112818,127440,129463,1456443,97366,246685,95630,109897,100698,111087,164587,107092,190894,97351,1915898,98238,1455029,1986966,1907936,133463,95650,109313,2637094,129450,3719257,750862,150733,109029,190887,133502,112362,1431157,true,125,452]
#8
⏱️ 24.52 мс
select min(sp.id) as best_sp_id from "store_prices" as "sp" where "sp"."master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "sp"."price" > ? and "sp"."store_id" in (?, ?) group by sp.store_id, CASE WHEN sp.master_product_id = 1462716 THEN 3170808 WHEN sp.master_product_id = 3170808 THEN 3170808 WHEN sp.master_product_id = 123050 THEN 3170808 WHEN sp.master_product_id = 3041110 THEN 3170808 WHEN sp.master_product_id = 160427 THEN 3170808 WHEN sp.master_product_id = 2812826 THEN 3170808 WHEN sp.master_product_id = 2903796 THEN 2903796 WHEN sp.master_product_id = 1959667 THEN 2903796 WHEN sp.master_product_id = 109696 THEN 2903796 WHEN sp.master_product_id = 194993 THEN 2903796 WHEN sp.master_product_id = 193908 THEN 2903796 WHEN sp.master_product_id = 154945 THEN 2903796 WHEN sp.master_product_id = 133500 THEN 2903796 WHEN sp.master_product_id = 1458061 THEN 4039359 WHEN sp.master_product_id = 1909941 THEN 4039359 WHEN sp.master_product_id = 1930007 THEN 4039359 WHEN sp.master_product_id = 205836 THEN 4039359 WHEN sp.master_product_id = 112818 THEN 4039359 WHEN sp.master_product_id = 4039359 THEN 4039359 WHEN sp.master_product_id = 127440 THEN 4039359 WHEN sp.master_product_id = 129463 THEN 4039359 WHEN sp.master_product_id = 1456443 THEN 2896664 WHEN sp.master_product_id = 97366 THEN 2896664 WHEN sp.master_product_id = 246685 THEN 2896664 WHEN sp.master_product_id = 95630 THEN 2896664 WHEN sp.master_product_id = 109897 THEN 2896664 WHEN sp.master_product_id = 100698 THEN 2896664 WHEN sp.master_product_id = 2896664 THEN 2896664 WHEN sp.master_product_id = 111087 THEN 2896664 WHEN sp.master_product_id = 164587 THEN 2896664 WHEN sp.master_product_id = 107092 THEN 2986223 WHEN sp.master_product_id = 190894 THEN 2986223 WHEN sp.master_product_id = 97351 THEN 2986223 WHEN sp.master_product_id = 2986223 THEN 2986223 WHEN sp.master_product_id = 1915898 THEN 2986223 WHEN sp.master_product_id = 98238 THEN 2986223 WHEN sp.master_product_id = 1455029 THEN 2986223 WHEN sp.master_product_id = 1986966 THEN 2986223 WHEN sp.master_product_id = 1907936 THEN 2986223 WHEN sp.master_product_id = 133463 THEN 2986223 WHEN sp.master_product_id = 95650 THEN 2986223 WHEN sp.master_product_id = 109313 THEN 2986223 WHEN sp.master_product_id = 2637094 THEN 2986223 WHEN sp.master_product_id = 3876067 THEN 3876067 WHEN sp.master_product_id = 129450 THEN 3876067 WHEN sp.master_product_id = 3719257 THEN 3876067 WHEN sp.master_product_id = 3067885 THEN 3067885 WHEN sp.master_product_id = 750862 THEN 3067885 WHEN sp.master_product_id = 150733 THEN 3067885 WHEN sp.master_product_id = 109029 THEN 3067885 WHEN sp.master_product_id = 190887 THEN 3067885 WHEN sp.master_product_id = 3068182 THEN 3068182 WHEN sp.master_product_id = 133502 THEN 3068182 WHEN sp.master_product_id = 7529293 THEN 7529293 WHEN sp.master_product_id = 112362 THEN 7529293 WHEN sp.master_product_id = 3052772 THEN 3052772 WHEN sp.master_product_id = 1431157 THEN 3052772 ELSE sp.master_product_id END limit 500
Bindings:
[7529293,7493489,7182537,6744655,6708345,4039359,3887679,3876067,3679020,3677696,3676089,3673474,3580503,3579307,3574922,3562691,3328776,3170808,3119358,3068182,3067885,3065978,3052772,2996211,2986223,2975667,2975219,2974530,2903796,2896664,2877891,2812735,1462716,123050,3041110,160427,2812826,1959667,109696,194993,193908,154945,133500,1458061,1909941,1930007,205836,112818,127440,129463,1456443,97366,246685,95630,109897,100698,111087,164587,107092,190894,97351,1915898,98238,1455029,1986966,1907936,133463,95650,109313,2637094,129450,3719257,750862,150733,109029,190887,133502,112362,1431157,0,125,452]
#9
⏱️ 22.14 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6249016,6249039,31334396,2297929,2294311,2298442,11222083,33459086,78055551,2298375,11219947,78076975,33455257,78058951,2298448,31325810,2299615,29747819,78065404,11199207,11215523,11220078,29752481,2295127,2296522,2297909,2298593,11220288,2295376,29768265,11202153,31327313,33450587,11196516]