#6
⏱️ 46.15 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?)
Bindings:
[2151263,2049531,2045870,2045396,1879254,1463428,1453435,1453433,1434014,984288,934016,825495,756800,754056,733716,715635,715419,711551,703670,702625,689451,689450,689449,689448,685427,684626,684444,681440,601214,600064,598075,598059,595069,557209,545496,539618,531939,511205,509326,509305,509223,509171,509170,509103,509102,506053,499851,497990,493305,476559,427384,427160,412867,409783,409780,398488,397672,395531,392630,379777,372989,370866,367682,365009,364789,364725,364409,364407,364403,364246,364245,363721,361547,337813,327734,327732,322317,311485,310778,310777,310574,310280,274786,269664,265819,265126,264936,264842,260446,259277,259276,258462,258269,256724,253681,252891,809367,420472,3015043,95010,764101,3549846,337070,1945358,124804,2769595,101043,2901961,3675179,368474,374223,2950238,122806,95379,2742300,2629564,3261507,1907886,2639215,101044,127029,154873,123105,122841,102185,102244,130085,94867,94974,97463,98565,101042,101339,1432304,1987013,133504,111462,97295,100365,4415300,155608,4859689,1907945,133540,150749,959071,1907944,true,127]
#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 = 809367 THEN 322317 WHEN sp.master_product_id = 420472 THEN 322317 WHEN sp.master_product_id = 3015043 THEN 322317 WHEN sp.master_product_id = 95010 THEN 322317 WHEN sp.master_product_id = 764101 THEN 322317 WHEN sp.master_product_id = 3549846 THEN 322317 WHEN sp.master_product_id = 337070 THEN 322317 WHEN sp.master_product_id = 1945358 THEN 322317 WHEN sp.master_product_id = 124804 THEN 322317 WHEN sp.master_product_id = 2769595 THEN 322317 WHEN sp.master_product_id = 101043 THEN 322317 WHEN sp.master_product_id = 2901961 THEN 322317 WHEN sp.master_product_id = 3675179 THEN 322317 WHEN sp.master_product_id = 368474 THEN 322317 WHEN sp.master_product_id = 374223 THEN 322317 WHEN sp.master_product_id = 2950238 THEN 322317 WHEN sp.master_product_id = 122806 THEN 322317 WHEN sp.master_product_id = 95379 THEN 322317 WHEN sp.master_product_id = 2742300 THEN 322317 WHEN sp.master_product_id = 2629564 THEN 322317 WHEN sp.master_product_id = 3261507 THEN 322317 WHEN sp.master_product_id = 1907886 THEN 322317 WHEN sp.master_product_id = 2639215 THEN 322317 WHEN sp.master_product_id = 101044 THEN 322317 WHEN sp.master_product_id = 322317 THEN 322317 WHEN sp.master_product_id = 127029 THEN 322317 WHEN sp.master_product_id = 154873 THEN 322317 WHEN sp.master_product_id = 123105 THEN 322317 WHEN sp.master_product_id = 122841 THEN 322317 WHEN sp.master_product_id = 102185 THEN 322317 WHEN sp.master_product_id = 102244 THEN 322317 WHEN sp.master_product_id = 130085 THEN 322317 WHEN sp.master_product_id = 94867 THEN 322317 WHEN sp.master_product_id = 94974 THEN 322317 WHEN sp.master_product_id = 97463 THEN 322317 WHEN sp.master_product_id = 98565 THEN 322317 WHEN sp.master_product_id = 101042 THEN 322317 WHEN sp.master_product_id = 101339 THEN 322317 WHEN sp.master_product_id = 1432304 THEN 598075 WHEN sp.master_product_id = 1987013 THEN 598075 WHEN sp.master_product_id = 598075 THEN 598075 WHEN sp.master_product_id = 133504 THEN 598075 WHEN sp.master_product_id = 111462 THEN 598075 WHEN sp.master_product_id = 364403 THEN 364403 WHEN sp.master_product_id = 97295 THEN 364403 WHEN sp.master_product_id = 100365 THEN 364403 WHEN sp.master_product_id = 364245 THEN 364245 WHEN sp.master_product_id = 4415300 THEN 364245 WHEN sp.master_product_id = 155608 THEN 364245 WHEN sp.master_product_id = 4859689 THEN 1453433 WHEN sp.master_product_id = 1907945 THEN 1453433 WHEN sp.master_product_id = 1453433 THEN 1453433 WHEN sp.master_product_id = 133540 THEN 1453433 WHEN sp.master_product_id = 150749 THEN 1453433 WHEN sp.master_product_id = 959071 THEN 364246 WHEN sp.master_product_id = 364246 THEN 364246 WHEN sp.master_product_id = 1907944 THEN 1463428 WHEN sp.master_product_id = 1463428 THEN 1463428 ELSE sp.master_product_id END limit 500
Bindings:
[2151263,2049531,2045870,2045396,1879254,1463428,1453435,1453433,1434014,984288,934016,825495,756800,754056,733716,715635,715419,711551,703670,702625,689451,689450,689449,689448,685427,684626,684444,681440,601214,600064,598075,598059,595069,557209,545496,539618,531939,511205,509326,509305,509223,509171,509170,509103,509102,506053,499851,497990,493305,476559,427384,427160,412867,409783,409780,398488,397672,395531,392630,379777,372989,370866,367682,365009,364789,364725,364409,364407,364403,364246,364245,363721,361547,337813,327734,327732,322317,311485,310778,310777,310574,310280,274786,269664,265819,265126,264936,264842,260446,259277,259276,258462,258269,256724,253681,252891,809367,420472,3015043,95010,764101,3549846,337070,1945358,124804,2769595,101043,2901961,3675179,368474,374223,2950238,122806,95379,2742300,2629564,3261507,1907886,2639215,101044,127029,154873,123105,122841,102185,102244,130085,94867,94974,97463,98565,101042,101339,1432304,1987013,133504,111462,97295,100365,4415300,155608,4859689,1907945,133540,150749,959071,1907944,0,127]
#9
⏱️ 36.85 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6220459,6212623,6216036,6217227,6219036,6219037,6203529,6215867,6215961,6217152,6218823,6212624,6209976,6218924,6220226,6220440,6220442,6201941,6202251,6203530,6209867,6209868,6208857,6209974,6209977,6211194,6211230,6211386,6218666,6210025,6218631,6220412,6203558,6211482,6218586,6220460,6211193,6211195,6218923,6220225,6220441,6203531,7743150,6211156,6215993,6209864,6209865,6209941,6209942,6210023,6211134,6211164,7736647,6217483,6202408,6218835,6215598,6205230,6205249,6212823,6216027,6203521,6211084,6211225,6212858,6203524,6203525,6203526,6203527,6220227,6202403,6210024,6211163,6220224,6212622,6218832,6217099,6218634,6510413,6205242,6203593,6205243]