#2
⏱️ 1318.52 мс
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",443,616,435,347,true,443,616,435,347]
#3
⏱️ 397.12 мс
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",443,616,435,347,true,443,616,435,347]
#4
⏱️ 17.6 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[108808721,108787969,4990833,4990832,4990772,4990715,4990523,4988820,4988768,4986683,4986363,4986222,4985770,4984783,4984678,4984486,4984020,4984009,4983892,4983757,4983651,4608224,4546366,4546223,4536177,4523221,3927220,3854695,3556383,3395115,3253804,2896439,true,443,616,435,347]
#5
⏱️ 31.4 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?)
Bindings:
[108808721,108787969,4990833,4990832,4990772,4990715,4990523,4988820,4988768,4986683,4986363,4986222,4985770,4984783,4984678,4984486,4984020,4984009,4983892,4983757,4983651,4608224,4546366,4546223,4536177,4523221,3927220,3854695,3556383,3395115,3253804,2896439,0,443,616,435,347]