#1
⏱️ 61.41 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"eilat"]
#2
⏱️ 1322.18 мс
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:
["snacks","chips_savory",1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363,true,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363]
#3
⏱️ 551.01 мс
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:
["snacks","chips_savory",1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363,true,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363]
#4
⏱️ 11.35 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 3.84 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 44.99 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[108808721,108787969,89331054,7460691,7443730,7443272,7443271,7443269,7442349,4809781,4523221,4272168,4146579,3854696,2671000,2670972,2667237,2641893,1910802,1567603,1456789,1456787,1453137,1451696,1451626,692746,682232,378393,362443,281889,281449,264842,3702666,true,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363]
#7
⏱️ 4.97 мс
select * from "stores" where "stores"."id" in (21, 148, 363)
#8
⏱️ 10.05 мс
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 = 2667237 THEN 2667237 WHEN sp.master_product_id = 3702666 THEN 2667237 ELSE sp.master_product_id END limit 500
Bindings:
[108808721,108787969,89331054,7460691,7443730,7443272,7443271,7443269,7442349,4809781,4523221,4272168,4146579,3854696,2671000,2670972,2667237,2641893,1910802,1567603,1456789,1456787,1453137,1451696,1451626,692746,682232,378393,362443,281889,281449,264842,3702666,0,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363]
#9
⏱️ 28.58 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[822430,21248546,111931325,866802,5046911,46152828,862253,71026953,69793446,103049769,5731120,104920701,12067885,2526605,12069037,94769474,2526632,31676110,104229431,12069574,30239821,12067473,2526604,2526606,2526607,31681231,30231710,62615049,79822165,79822167,10307952,10307058,10307104,85769193,1802462,1802665,88600353,10311221,77438601,77438603,526652,524967,526822]
#10
⏱️ 4.19 мс
select * from "stores" where "stores"."id" in (21, 148, 237, 363, 481, 755, 767)
#11
⏱️ 11.84 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["eilat"]
#12
⏱️ 5.02 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 6.67 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]