#1
⏱️ 177.35 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"bat-yam"]
#2
⏱️ 488.79 мс
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:
["drinks","coffee_tea",751,1121,1250,1260,618,459,676,675,677,124,232,318,409,true,751,1121,1250,1260,618,459,676,675,677,124,232,318,409]
#3
⏱️ 355.85 мс
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:
["drinks","coffee_tea",751,1121,1250,1260,618,459,676,675,677,124,232,318,409,true,751,1121,1250,1260,618,459,676,675,677,124,232,318,409]
#4
⏱️ 12.86 мс
select * from "canonical_products" where "canonical_products"."id" in (253)
#5
⏱️ 12.04 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[253]
#6
⏱️ 41.27 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4990895,4990894,4984655,3887416,3087552,2998415,2994545,2987072,2748827,2073322,1925775,1882359,1546572,1460924,1433911,495735,310388,259277,259276,200157,190892,190065,190064,166991,166990,166989,166987,166986,166983,166981,166976,166690,150776,133493,109070,95638,true,751,1121,1250,1260,618,459,676,675,677,124,232,318,409]
#7
⏱️ 11.9 мс
select * from "stores" where "stores"."id" in (124, 232, 318, 409)
#8
⏱️ 20.17 мс
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 = 190892 THEN 190892 WHEN sp.master_product_id = 150776 THEN 190892 WHEN sp.master_product_id = 133493 THEN 190892 WHEN sp.master_product_id = 109070 THEN 190892 WHEN sp.master_product_id = 95638 THEN 190892 ELSE sp.master_product_id END limit 500
Bindings:
[4990895,4990894,4984655,3887416,3087552,2998415,2994545,2987072,2748827,2073322,1925775,1882359,1546572,1460924,1433911,495735,310388,259277,259276,200157,190892,190065,190064,166991,166990,166989,166987,166986,166983,166981,166976,166690,150776,133493,109070,95638,0,751,1121,1250,1260,618,459,676,675,677,124,232,318,409]
#9
⏱️ 72.75 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[528974,590510,5861704,1028670,4901611,1035506,4901610,4876001,4901643,1493118,2368246,2376100,11456189,2375287,2367488,33534576,29906436,2923504,2923507,2923508,11462351,3227182,2923509,2914242,2915076,2924235,3224089,11462182,3228618,3223744,3224297,3230536,3230537,1743309,6796733,1740329,1749090,1744754,6790625,1749553,32911016,56782228]
#10
⏱️ 8.92 мс
select * from "stores" where "stores"."id" in (124, 232, 318, 409, 459, 618, 751)
#11
⏱️ 10.61 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["bat-yam"]
#12
⏱️ 6.09 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 15.33 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]