#1
⏱️ 187.95 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"beit-shemesh"]
#2
⏱️ 5390.33 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_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:
["household",742,273,479,24,true,742,273,479,24]
#3
⏱️ 2444.96 мс
select * from "master_products" where "barcode" is not null and "category_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:
["household",742,273,479,24,true,742,273,479,24]
#4
⏱️ 14.15 мс
select * from "canonical_products" where "canonical_products"."id" in (38)
#5
⏱️ 12.49 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[38]
#6
⏱️ 29.24 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[24332368,8775654,8775650,7473385,4649624,3340041,2807242,2715904,2672991,2672977,2672969,2634735,2613163,2049531,1879230,1515272,1474750,1461209,1452544,1452543,1452542,1452541,1452163,1432357,1429495,1429097,1428855,1421419,994293,788548,753210,711551,2681555,true,742,273,479,24]
#7
⏱️ 14.23 мс
select * from "stores" where "stores"."id" in (24, 273, 742)
#8
⏱️ 27.26 мс
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 = 2672969 THEN 2672969 WHEN sp.master_product_id = 2681555 THEN 2672969 WHEN sp.master_product_id = 2672977 THEN 2672969 ELSE sp.master_product_id END limit 500
Bindings:
[24332368,8775654,8775650,7473385,4649624,3340041,2807242,2715904,2672991,2672977,2672969,2634735,2613163,2049531,1879230,1515272,1474750,1461209,1452544,1452543,1452542,1452541,1452163,1432357,1429495,1429097,1428855,1421419,994293,788548,753210,711551,2681555,0,742,273,479,24]
#9
⏱️ 34.11 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5895447,5761068,5765459,99296588,99296589,97732006,99296590,5773149,5774290,90182552,90168793,90179813,90175088,90160320,90157180,12055733,90179753,31668969,90164471,90164495,90151764,2521504,90143300,2522123,4025142,9603570,9570243,9581283,9581352,9798201]
#10
⏱️ 11.06 мс
select * from "stores" where "stores"."id" in (24, 273, 479, 742)
#11
⏱️ 6.45 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["beit-shemesh"]
#12
⏱️ 8.43 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 10.13 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]