#2
⏱️ 1064.54 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "master_products"."id" in ((select "master_product_id" from "store_prices" where "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)) union (select "master_product_id" from "deals" where "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)))
Bindings:
[1142,1160,1230,1232,1261,1280,1305,1312,1321,1349,1352,1384,true,1142,1160,1230,1232,1261,1280,1305,1312,1321,1349,1352,1384]
#3
⏱️ 386.53 мс
select * from "master_products" where "barcode" is not null and "master_products"."id" in ((select "master_product_id" from "store_prices" where "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)) union (select "master_product_id" from "deals" where "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))) order by CASE WHEN master_products.image_url IS NOT NULL AND master_products.image_url != '' THEN 0 ELSE 1 END, "master_products"."id" desc limit 96 offset 0
Bindings:
[1142,1160,1230,1232,1261,1280,1305,1312,1321,1349,1352,1384,true,1142,1160,1230,1232,1261,1280,1305,1312,1321,1349,1352,1384]
#4
⏱️ 54.46 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4531886,2864871,2634246,1717061,1436870,1435244,1435140,1434559,1428641,1427111,1427110,1426706,1425582,1420191,1420179,1420127,1420115,1420109,1420095,1420066,1420065,1419998,1419997,1419988,1419974,1419968,1419950,1419940,1419603,1419598,1333076,1333062,1279655,989214,977821,912218,749117,200449,200446,189823,181279,180993,160184,160088,160085,158556,154554,149801,149543,134684,132826,127238,127161,126553,126225,126115,126111,125897,125706,125689,125598,124307,122906,115521,113388,108724,106307,106259,106247,101843,101633,101589,101415,101414,101411,101405,101279,101195,101143,101120,101119,101118,101113,101096,101090,99772,99770,99433,99432,98930,98929,98870,98826,97576,97575,97573,true,1142,1160,1230,1232,1261,1280,1305,1312,1321,1349,1352,1384]
#6
⏱️ 87.7 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4531886,2864871,2634246,1717061,1436870,1435244,1435140,1434559,1428641,1427111,1427110,1426706,1425582,1420191,1420179,1420127,1420115,1420109,1420095,1420066,1420065,1419998,1419997,1419988,1419974,1419968,1419950,1419940,1419603,1419598,1333076,1333062,1279655,989214,977821,912218,749117,200449,200446,189823,181279,180993,160184,160088,160085,158556,154554,149801,149543,134684,132826,127238,127161,126553,126225,126115,126111,125897,125706,125689,125598,124307,122906,115521,113388,108724,106307,106259,106247,101843,101633,101589,101415,101414,101411,101405,101279,101195,101143,101120,101119,101118,101113,101096,101090,99772,99770,99433,99432,98930,98929,98870,98826,97576,97575,97573,0,1142,1160,1230,1232,1261,1280,1305,1312,1321,1349,1352,1384]