#1
⏱️ 43.8 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"raanana"]
#2
⏱️ 465.93 мс
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",1108,762,1133,1198,1205,585,637,56,100,159,460,511,656,659,692,140,230,346,316,364,true,1108,762,1133,1198,1205,585,637,56,100,159,460,511,656,659,692,140,230,346,316,364]
#3
⏱️ 154.62 мс
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",1108,762,1133,1198,1205,585,637,56,100,159,460,511,656,659,692,140,230,346,316,364,true,1108,762,1133,1198,1205,585,637,56,100,159,460,511,656,659,692,140,230,346,316,364]
#4
⏱️ 1.22 мс
select * from "canonical_products" where "canonical_products"."id" in (284)
#5
⏱️ 0.68 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[284]
#6
⏱️ 5.33 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[7455589,7455588,7065236,6745776,6730411,4989781,4989766,4987587,4987518,4987434,4987359,4987332,4987208,4987001,4986833,4986722,4986611,4986361,4984139,4983944,4536333,4528693,4315844,4122596,4109740,4075884,4075080,4061313,4060942,4059577,4038041,4036040,4215849,true,1108,762,1133,1198,1205,585,637,56,100,159,460,511,656,659,692,140,230,346,316,364]
#7
⏱️ 2.27 мс
select * from "stores" where "stores"."id" in (100, 140, 316, 364)
#8
⏱️ 6.31 мс
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 = 4215849 THEN 4315844 WHEN sp.master_product_id = 4315844 THEN 4315844 ELSE sp.master_product_id END limit 500
Bindings:
[7455589,7455588,7065236,6745776,6730411,4989781,4989766,4987587,4987518,4987434,4987359,4987332,4987208,4987001,4986833,4986722,4986611,4986361,4984139,4983944,4536333,4528693,4315844,4122596,4109740,4075884,4075080,4061313,4060942,4059577,4038041,4036040,4215849,0,1108,762,1133,1198,1205,585,637,56,100,159,460,511,656,659,692,140,230,346,316,364]
#9
⏱️ 13.23 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[68631765,67784121,78882930,78882902,11480639,11482088,2380915,19137023,30408138,19141785,56686450,78758699,3432047,24549114,24546244,24549116,24550044,3447205,24579564,3433510,3446356,78003420,78019676,11614721,12289054,12289653,12293880,12294634,12294745,12294856,12295024,12295731,12295855,12295882,12295957,12296041,12296110,12300796,12300811]
#10
⏱️ 0.99 мс
select * from "stores" where "stores"."id" in (100, 140, 316, 364, 460, 511, 585, 637)
#11
⏱️ 1.38 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["raanana"]
#12
⏱️ 1.16 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 1.89 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]