#2
⏱️ 345.11 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_slug" = ? and "subcategory_slug" = ? and (exists (select 1 from "store_prices" where "store_prices"."master_product_id" = "master_products"."id" and "store_prices"."store_id" in (?, ?, ?)) or exists (select 1 from "deals" where "deals"."master_product_id" = "master_products"."id" and "deals"."is_active" = ? and "deals"."store_id" in (?, ?, ?)))
Bindings:
["snacks","chips_savory",471,90,243,true,471,90,243]
#3
⏱️ 89.11 мс
select * from "master_products" where "barcode" is not null and "category_slug" = ? and "subcategory_slug" = ? and (exists (select 1 from "store_prices" where "store_prices"."master_product_id" = "master_products"."id" and "store_prices"."store_id" in (?, ?, ?)) or exists (select 1 from "deals" where "deals"."master_product_id" = "master_products"."id" and "deals"."is_active" = ? and "deals"."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 32 offset 0
Bindings:
["snacks","chips_savory",471,90,243,true,471,90,243]
#4
⏱️ 4.46 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?)
Bindings:
[32975885,32975875,32975867,32975846,3854696,3854695,2641893,1911990,1909873,1909865,1457875,1456789,1456787,1453137,1451712,1451696,1451626,1451473,1227034,362443,281449,242656,208252,208251,207716,197740,193506,189941,189940,165452,165434,164977,true,471,90,243]
#6
⏱️ 4.36 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?)
Bindings:
[32975885,32975875,32975867,32975846,3854696,3854695,2641893,1911990,1909873,1909865,1457875,1456789,1456787,1453137,1451712,1451696,1451626,1451473,1227034,362443,281449,242656,208252,208251,207716,197740,193506,189941,189940,165452,165434,164977,0,471,90,243]