#1
⏱️ 41.36 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"modiin"]
#2
⏱️ 202.56 мс
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",713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348,true,713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348]
#3
⏱️ 207.74 мс
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",713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348,true,713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348]
#4
⏱️ 1.61 мс
select * from "canonical_products" where "canonical_products"."id" in (283, 286)
#5
⏱️ 1.9 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[283,286]
#6
⏱️ 7.82 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[12196449,6809522,4990576,4990374,4988227,4987429,4546334,4546313,4546301,4546279,4546274,4546265,4546263,4546262,4529792,4174891,4127300,4060426,4031498,4030805,4002769,3991036,3986018,3973055,3458976,3246016,2976308,2975340,2975183,2842852,2702452,2680174,2680729,149430,true,713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348]
#7
⏱️ 5.39 мс
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,6809522,4990576,4990374,4988227,4987429,4546334,4546313,4546301,4546279,4546274,4546265,4546263,4546262,4529792,4174891,4127300,4060426,4031498,4030805,4002769,3991036,3986018,3973055,3458976,3246016,2976308,2975340,2975183,2842852,2702452,2680174,2680729,149430,0,713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348]
#8
⏱️ 16.22 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[1892152,33051673,10400496,10400991,10401148,10402613,1889473,33061836,2152236,31167772,10773184,10784215,29515690,2151880,3497837,24712837,24706074,3508445,3508095,3508676,3498143,78184033,3498580,52263352,12390358,2728874,2733672,7621900,2733674,2733683,2733688,2733709,2733720,2733742,12389440,12390240,12392389,12392591]
#9
⏱️ 1.11 мс
select * from "stores" where "stores"."id" in (426, 439, 549, 713)
#10
⏱️ 1.17 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["modiin"]
#11
⏱️ 1.07 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#12
⏱️ 1.38 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]