#1
⏱️ 129.24 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"netivot"]
#2
⏱️ 720.67 мс
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",445,623,true,445,623]
#3
⏱️ 168.79 мс
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",445,623,true,445,623]
#4
⏱️ 15.79 мс
select * from "canonical_products" where "canonical_products"."id" in (38)
#5
⏱️ 1.51 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[38]
#6
⏱️ 9.76 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[7065236,6745776,6730411,4989781,4989766,4987587,4987518,4987434,4987359,4987332,4987208,4987001,4986833,4986722,4986611,4986361,4984139,4983944,4528693,3739767,2717082,2717075,2717021,2681555,2674471,2671354,2659225,1459891,1453881,1451783,1426420,615729,2672969,2672977,true,445,623]
#7
⏱️ 10.72 мс
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 = 2681555 THEN 2681555 WHEN sp.master_product_id = 2672969 THEN 2681555 WHEN sp.master_product_id = 2672977 THEN 2681555 ELSE sp.master_product_id END limit 500
Bindings:
[7065236,6745776,6730411,4989781,4989766,4987587,4987518,4987434,4987359,4987332,4987208,4987001,4986833,4986722,4986611,4986361,4984139,4983944,4528693,3739767,2717082,2717075,2717021,2681555,2674471,2671354,2659225,1459891,1453881,1451783,1426420,615729,2672969,2672977,0,445,623]
#8
⏱️ 22.55 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[2211519,29586470,2217476,2222594,2222929,2211044,2215535,2214325,10940860,2223210,2223441,29588662,10961278,10952464,10976534,12359558,12362481,12350347,12350967,12355189,12355939,12356050,12356161,12356329,12357036,12357160,12357187,12357262,12357346,12357415,12361702,12361717]
#9
⏱️ 4.43 мс
select * from "stores" where "stores"."id" in (445, 623)
#10
⏱️ 7.3 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["netivot"]
#11
⏱️ 7.71 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#12
⏱️ 5.53 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]