#1
⏱️ 195.01 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"nes-ziona"]
#2
⏱️ 403.8 мс
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",272,614,110,651,91,130,339,true,272,614,110,651,91,130,339]
#3
⏱️ 312.77 мс
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",272,614,110,651,91,130,339,true,272,614,110,651,91,130,339]
#4
⏱️ 4.64 мс
select * from "canonical_products" where "canonical_products"."id" in (253)
#5
⏱️ 13.24 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[253]
#6
⏱️ 41.61 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?)
Bindings:
[4990895,4990894,4984655,3887416,2994545,2073322,1546572,1433911,200157,190892,190065,166991,166990,166989,166987,166986,166976,134878,134426,131693,131512,130536,129744,128649,128498,128283,128112,128034,126693,126621,126498,126497,150776,133493,109070,95638,true,272,614,110,651,91,130,339]
#7
⏱️ 15.67 мс
select * from "stores" where "stores"."id" in (91, 110, 130, 272, 339)
#8
⏱️ 22.53 мс
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,2994545,2073322,1546572,1433911,200157,190892,190065,166991,166990,166989,166987,166986,166976,134878,134426,131693,131512,130536,129744,128649,128498,128283,128112,128034,126693,126621,126498,126497,150776,133493,109070,95638,0,272,614,110,651,91,130,339]
#9
⏱️ 30 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[56685469,4883047,64476676,4855610,56493165,6537958,6537959,56493168,6149844,6147789,6147798,6147835,6149847,56220792,6124368,5503880,5503882,5510075,5510078,5495738,5511828,3201493,3201748,3201823,2879621,7916709,7916711,2881943,2888275,2879697,3203707,3204354,2889145,2889148,2889149,2889150,3204640,2889151,2879044,2879982,2889912,3201547,3206076,3201202,3201755,3207994,3207995]
#10
⏱️ 18.58 мс
select * from "stores" where "stores"."id" in (91, 110, 130, 272, 339, 614)
#11
⏱️ 12.31 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["nes-ziona"]
#12
⏱️ 12.86 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 14.24 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]