#1
⏱️ 109.47 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"eilat"]
#2
⏱️ 659.9 мс
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
⏱️ 408.04 мс
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
⏱️ 8.49 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 1.9 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 8.82 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[89331054,7460691,7443730,7443272,7443271,7443269,7442349,4809781,4523221,4272168,3854696,2670972,2667237,2641893,1456789,1456787,1453137,1451696,1451626,692746,682232,378393,362443,281889,281449,264842,242656,208252,208251,207716,197740,193506,3702666,true,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363]
#7
⏱️ 1.03 мс
select * from "stores" where "stores"."id" in (21, 123, 148)
#8
⏱️ 9.26 мс
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 = 3702666 THEN 2667237 WHEN sp.master_product_id = 2667237 THEN 2667237 ELSE sp.master_product_id END limit 500
Bindings:
[89331054,7460691,7443730,7443272,7443271,7443269,7442349,4809781,4523221,4272168,3854696,2670972,2667237,2641893,1456789,1456787,1453137,1451696,1451626,692746,682232,378393,362443,281889,281449,264842,242656,208252,208251,207716,197740,193506,3702666,0,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363]
#9
⏱️ 6.73 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[55666357,822430,21248546,6337679,5046910,866802,5046911,46152828,862253,71026953,69793446,30236367,2525941,2525959,12067885,2526605,2526632,31676110,12069574,30239821,12067473,2526604,2526606,2526607,31681231,30231710,62615049,10311865,1802569,1804157,1795649,1795659,10307952,10307058,10307104,1802462,1802665,10311221,524966,526652,524967,526822]
#10
⏱️ 3.81 мс
select * from "stores" where "stores"."id" in (21, 123, 148, 481, 755, 767)
#11
⏱️ 3.33 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["eilat"]
#12
⏱️ 3.61 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 3.93 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]