#1
⏱️ 126.9 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"rehovot"]
#2
⏱️ 1416.71 мс
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","baking_spices",1120,215,764,768,335,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,371,390,true,1120,215,764,768,335,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,371,390]
#3
⏱️ 343.08 мс
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","baking_spices",1120,215,764,768,335,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,371,390,true,1120,215,764,768,335,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,371,390]
#4
⏱️ 1.5 мс
select * from "canonical_products" where "canonical_products"."id" in (283, 286)
#5
⏱️ 0.78 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[283,286]
#6
⏱️ 3.04 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[12196449,12196440,4990576,4990374,4988227,4987429,4670178,4546334,4546313,4546301,4546279,4546274,4546265,4546263,4546262,4529792,4032627,4030805,3991036,3986018,3984999,3458976,2842852,2702452,2680174,2670979,2666027,2663549,2640775,2640774,2608194,2564252,2680729,149430,true,1120,215,764,768,335,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,371,390]
#7
⏱️ 3.99 мс
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 = 4546313 THEN 4546313 WHEN sp.master_product_id = 2680729 THEN 4546313 WHEN sp.master_product_id = 4546301 THEN 4546301 WHEN sp.master_product_id = 149430 THEN 4546301 ELSE sp.master_product_id END limit 500
Bindings:
[12196449,12196440,4990576,4990374,4988227,4987429,4670178,4546334,4546313,4546301,4546279,4546274,4546265,4546263,4546262,4529792,4032627,4030805,3991036,3986018,3984999,3458976,2842852,2702452,2680174,2670979,2666027,2663549,2640775,2640774,2608194,2564252,2680729,149430,0,1120,215,764,768,335,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,371,390]
#8
⏱️ 5.41 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4899456,2320996,2317286,2317352,2323847,2328763,11324604,2330271,2317996,2317073,2328805,3522623,24726723,24715253,3522070,24726816,20058303,16130147,3152881,2808532,7798885,7798887,7798896,7798901,7798923,7798934,7798956,2807903,3151965,3152763,3154910,3155112,12344262,12342346,12344144,12348293,12348995,219693,3021811,2746087,3110378,2746089,2746098,2746103,2746125,2746137,2746159,218777,219575,221722,221924]
#9
⏱️ 2.52 мс
select * from "stores" where "stores"."id" in (173, 455, 550, 597, 620, 768)
#10
⏱️ 1.62 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["rehovot"]
#11
⏱️ 1.18 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#12
⏱️ 1.33 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]