#1
⏱️ 105.86 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"maale-adumim"]
#2
⏱️ 512.24 мс
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:
["grocery","canned_preserves",262,1265,128,true,262,1265,128]
#3
⏱️ 215.79 мс
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:
["grocery","canned_preserves",262,1265,128,true,262,1265,128]
#4
⏱️ 19.07 мс
select * from "canonical_products" where "canonical_products"."id" in (320)
#5
⏱️ 10.49 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[320]
#6
⏱️ 39.8 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?)
Bindings:
[4536333,1434518,506053,452321,314345,314342,314340,314335,314331,314329,314328,314326,192680,160421,159470,159469,152128,133426,132282,132281,131283,127587,126828,115193,114180,108733,108521,108520,108519,108518,108094,108093,4546240,true,262,1265,128]
#7
⏱️ 10.16 мс
select * from "stores" where "stores"."id" in (128)
#8
⏱️ 27.1 мс
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 = 4546240 THEN 192680 WHEN sp.master_product_id = 192680 THEN 192680 ELSE sp.master_product_id END limit 500
Bindings:
[4536333,1434518,506053,452321,314345,314342,314340,314335,314331,314329,314328,314326,192680,160421,159470,159469,152128,133426,132282,132281,131283,127587,126828,115193,114180,108733,108521,108520,108519,108518,108094,108093,4546240,0,262,1265,128]
#9
⏱️ 29.29 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6197881,6197882,6199364,6199365,6199366,6199367,6200592,6194458,6194735,6184275,6190402,7728930,6185643,6185644,6185729,6176746,6185816,6185818,6187155,6182555,6191592,6191597,6191599,6191600,6191606,6191607,6191610,67977854,67977853,955018,952827]
#10
⏱️ 9.27 мс
select * from "stores" where "stores"."id" in (128, 262)
#11
⏱️ 5.16 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["maale-adumim"]
#12
⏱️ 12.84 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 6.57 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]