#1
⏱️ 193.44 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"zikhron-yaakov"]
#2
⏱️ 603.8 мс
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",443,616,435,347,true,443,616,435,347]
#3
⏱️ 284.42 мс
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",443,616,435,347,true,443,616,435,347]
#4
⏱️ 13.82 мс
select * from "canonical_products" where "canonical_products"."id" in (283, 286)
#5
⏱️ 8.55 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[283,286]
#6
⏱️ 19.83 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[4990576,4990374,4988227,4987429,4546334,4546313,4546301,4546279,4546274,4546265,4546263,4546262,3458976,3246016,2842852,2702452,2680174,2670979,2666098,2666027,2663549,2640775,2640774,2608194,1469150,1455751,1433604,685427,364789,256300,204335,199856,2680729,149430,true,443,616,435,347]
#7
⏱️ 15.77 мс
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:
[4990576,4990374,4988227,4987429,4546334,4546313,4546301,4546279,4546274,4546265,4546263,4546262,3458976,3246016,2842852,2702452,2680174,2670979,2666098,2666027,2663549,2640775,2640774,2608194,1469150,1455751,1433604,685427,364789,256300,204335,199856,2680729,149430,0,443,616,435,347]
#8
⏱️ 49.73 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[29468113,10674769,31109408,2093387,10661559,2089323,2086140,2086376,10662930,10663768,67728457,31110167,10672726,2085839,29462346,67728623,10663832,1830435,10337422,10339421,1820254,1829151,1824813,10331701,29213051,29215347,67491122,32993614,29211124,1825594,10337690,29218432,2901484,7943435,3209129,2901453,3215189,3212917,12196078,12196079,12196081,7958938,12196095,12196116,12196128,12196149,3212001,3212799,3214946,3215148]
#9
⏱️ 10.2 мс
select * from "stores" where "stores"."id" in (435, 443, 616)
#10
⏱️ 15.97 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["zikhron-yaakov"]
#11
⏱️ 17.86 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#12
⏱️ 14.29 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]