#1
⏱️ 32.54 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"rehovot"]
#2
⏱️ 500.45 мс
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",1120,215,764,768,335,371,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,390,true,1120,215,764,768,335,371,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,390]
#3
⏱️ 133.02 мс
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",1120,215,764,768,335,371,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,390,true,1120,215,764,768,335,371,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,390]
#4
⏱️ 1.79 мс
select * from "canonical_products" where "canonical_products"."id" in (109, 117)
#5
⏱️ 0.88 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[109,117]
#6
⏱️ 10.09 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[7065236,6745776,6730411,4989781,4989766,4987587,4987518,4987434,4987359,4987332,4987208,4987001,4986833,4986722,4986611,4986361,4985848,4984139,4983944,4908582,4679481,4546323,4541335,4540288,4540285,4536333,4535016,4528693,4279044,4193606,4188615,4144199,4592992,100076,9960259,4016585,149368,2663583,true,1120,215,764,768,335,371,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,390]
#7
⏱️ 1.55 мс
select * from "stores" where "stores"."id" in (20, 134, 139, 173, 335, 349, 371, 390)
#8
⏱️ 10.21 мс
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 = 4541335 THEN 4541335 WHEN sp.master_product_id = 4592992 THEN 4541335 WHEN sp.master_product_id = 4679481 THEN 4541335 WHEN sp.master_product_id = 100076 THEN 4541335 WHEN sp.master_product_id = 9960259 THEN 4546323 WHEN sp.master_product_id = 4016585 THEN 4546323 WHEN sp.master_product_id = 149368 THEN 4546323 WHEN sp.master_product_id = 4546323 THEN 4546323 WHEN sp.master_product_id = 2663583 THEN 4546323 ELSE sp.master_product_id END limit 500
Bindings:
[7065236,6745776,6730411,4989781,4989766,4987587,4987518,4987434,4987359,4987332,4987208,4987001,4986833,4986722,4986611,4986361,4985848,4984139,4983944,4908582,4679481,4546323,4541335,4540288,4540285,4536333,4535016,4528693,4279044,4193606,4188615,4144199,4592992,100076,9960259,4016585,149368,2663583,0,1120,215,764,768,335,371,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,390]
#9
⏱️ 22.55 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[67325013,6016656,67874687,5951022,67793126,5665493,4896267,738856,5292474,1125500,1213260,69315049,1350349,2319792,11298579,11299460,11298742,78220993,3512304,3517274,3510031,3155081,7773287,25505374,7784903,2805665,7798945,12044902,3148480,3148675,3150384,3150897,3151147,3151258,3151369,3151537,3151744,3151868,3151895,3151970,3152054,3152123,3154302,3154317,3001622,3001457,25696490,3002138,12335091,12335786,12338999,12340013,12340763,12340874,12340985,12341153,12342125,12342249,12342276,12342351,12342435,12343004,12347183,12347198,507963,11915684,2734644,2739742,2734011,2704205,2739599,3104383,2709435,2746148,215292,215487,217196,217709,217959,218070,218181,218349,218556,218680,218707,218782,218866,218935,221114,221129]
#10
⏱️ 1.65 мс
select * from "stores" where "stores"."id" in (20, 134, 139, 173, 335, 349, 371, 390, 455, 550, 597, 620, 764, 768)
#11
⏱️ 2.4 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["rehovot"]
#12
⏱️ 1.48 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 2.08 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]