#1
⏱️ 183.77 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"givatayim"]
#2
⏱️ 818.99 мс
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:
["dairy","cheese",223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231,true,223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231]
#3
⏱️ 625.17 мс
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:
["dairy","cheese",223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231,true,223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231]
#4
⏱️ 13.03 мс
select * from "canonical_products" where "canonical_products"."id" in (155, 199)
#5
⏱️ 7.04 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[155,199]
#6
⏱️ 20.34 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[11135534,8314244,8314242,4990037,4286085,4279811,4157788,4085256,4019922,4008548,3985099,3974567,2802677,2679096,2668917,2668915,2633414,2611955,2611893,2611880,2611240,2611239,1461488,1461487,1453876,1452649,968724,680279,595069,197016,188207,178646,true,223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231]
#7
⏱️ 6.44 мс
select * from "stores" where "stores"."id" in (4, 73)
#8
⏱️ 19.68 мс
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 = 4286085 THEN 4157788 WHEN sp.master_product_id = 4157788 THEN 4157788 WHEN sp.master_product_id = 4085256 THEN 4019922 WHEN sp.master_product_id = 4019922 THEN 4019922 ELSE sp.master_product_id END limit 500
Bindings:
[11135534,8314244,8314242,4990037,4286085,4279811,4157788,4085256,4019922,4008548,3985099,3974567,2802677,2679096,2668917,2668915,2633414,2611955,2611893,2611880,2611240,2611239,1461488,1461487,1453876,1452649,968724,680279,595069,197016,188207,178646,0,223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231]
#9
⏱️ 16.81 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[1551126,1552913,1552543,27550118,1613436,1614454,1621276,1621277,462687,4577364,4554558,4559743,2039381,29410118,10572199,10572198,10573292,10550146,10573432,10572194,10572195,2035342,11243300,2315553,33469130,33469129,33469125,33469235,33469126,2305369,33469118,33469121,31342886,29874546,33518644,33508521,2365041,90518657,90513537,31746223,90553268,90547639,12162917,60106532,98428097,111052553,60097971,60131024,78510089,37809745,24855214,24855189,60100340,60100343]
#10
⏱️ 8.92 мс
select * from "stores" where "stores"."id" in (4, 16, 73, 431, 454, 458, 492, 493, 567)
#11
⏱️ 16.13 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["givatayim"]
#12
⏱️ 4.34 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 13.3 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]