#1
⏱️ 102.96 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"kiryat-shmona"]
#2
⏱️ 855.82 мс
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","sauces_oils",125,452,true,125,452]
#3
⏱️ 188.12 мс
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","sauces_oils",125,452,true,125,452]
#4
⏱️ 1.67 мс
select * from "canonical_products" where "canonical_products"."id" in (264)
#5
⏱️ 0.76 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[264]
#6
⏱️ 9.18 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[75165094,3931378,2807243,2752605,2702263,2671353,2669776,2658241,2657764,2632495,2631542,1458529,1458528,1458526,1456529,825495,816471,498260,493305,454494,440827,379022,277237,265819,264080,257318,252303,251968,245041,244240,193775,191910,98914,true,125,452]
#7
⏱️ 1.08 мс
select * from "stores" where "stores"."id" in (125)
#8
⏱️ 6.07 мс
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 = 98914 THEN 1458529 WHEN sp.master_product_id = 1458529 THEN 1458529 ELSE sp.master_product_id END limit 500
Bindings:
[75165094,3931378,2807243,2752605,2702263,2671353,2669776,2658241,2657764,2632495,2631542,1458529,1458528,1458526,1456529,825495,816471,498260,493305,454494,440827,379022,277237,265819,264080,257318,252303,251968,245041,244240,193775,191910,98914,0,125,452]
#9
⏱️ 12.1 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6264239,6266977,6266986,6267334,6267228,6267026,65453595,6268293,6262915,6267027,6261025,31330662,71846834,11212480,29751915,31324553,35317347,11200620,11202390,2295612,11212475,2301789,11204007,11202097,11200795,11217105,31321626,2298696,29765946,31334837,62092284]
#10
⏱️ 2.97 мс
select * from "stores" where "stores"."id" in (125, 452)
#11
⏱️ 5.39 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["kiryat-shmona"]
#12
⏱️ 1.27 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 4.85 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]