#1
⏱️ 164.45 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"akko"]
#2
⏱️ 3948.05 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_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",11,442,686,1368,221,true,11,442,686,1368,221]
#3
⏱️ 3121.59 мс
select * from "master_products" where "barcode" is not null and "category_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",11,442,686,1368,221,true,11,442,686,1368,221]
#4
⏱️ 17.83 мс
select * from "canonical_products" where "canonical_products"."id" in (38)
#5
⏱️ 7.97 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[38]
#6
⏱️ 25.31 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?)
Bindings:
[119993800,75165094,70704639,64064994,30691571,25603232,11136929,7065236,6745776,6730411,4536333,3931378,3739767,3484014,3458976,2864978,2844440,2842852,2811192,2770249,2752605,2717082,2717075,2717021,2702452,2702255,2701335,2681555,2680174,2674471,2674450,2674399,2672969,2672977,true,11,442,686,1368,221]
#7
⏱️ 12.8 мс
select * from "stores" where "stores"."id" in (11, 221)
#8
⏱️ 23.52 мс
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 = 2672969 THEN 2681555 WHEN sp.master_product_id = 2681555 THEN 2681555 WHEN sp.master_product_id = 2672977 THEN 2681555 ELSE sp.master_product_id END limit 500
Bindings:
[119993800,75165094,70704639,64064994,30691571,25603232,11136929,7065236,6745776,6730411,4536333,3931378,3739767,3484014,3458976,2864978,2844440,2842852,2811192,2770249,2752605,2717082,2717075,2717021,2702452,2702255,2701335,2681555,2680174,2674471,2674450,2674399,2672969,2672977,0,11,442,686,1368,221]
#9
⏱️ 31.54 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[67325035,2188878,2189036,2193467,2188562,29559165,2181587,29559889,2182827,33336915,10870207,10870317,10890470,33337909,33343723,2185093,108805765,31208324,33340706,77842824,29570718,41360007,10866245,10867726,10867602,88977462,103843813,67833887,103849797]
#10
⏱️ 10.09 мс
select * from "stores" where "stores"."id" in (11, 442)
#11
⏱️ 11.77 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["akko"]
#12
⏱️ 11.94 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 16.31 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]