#1
⏱️ 30.66 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"akko"]
#2
⏱️ 708.88 мс
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
⏱️ 779.92 мс
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
⏱️ 3.58 мс
select * from "canonical_products" where "canonical_products"."id" in (38)
#5
⏱️ 1.1 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[38]
#6
⏱️ 2.67 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?)
Bindings:
[75165094,30691571,25603232,7065236,6745776,6730411,4536333,3931378,3739767,3484014,3458976,2864978,2842852,2811192,2770249,2752605,2717082,2717075,2717021,2702452,2702255,2701335,2681555,2680174,2674471,2674450,2674399,2671354,2671353,2671017,2670979,2669776,2672969,2672977,true,11,442,686,1368,221]
#7
⏱️ 0.97 мс
select * from "stores" where "stores"."id" in (11, 221)
#8
⏱️ 1.82 мс
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:
[75165094,30691571,25603232,7065236,6745776,6730411,4536333,3931378,3739767,3484014,3458976,2864978,2842852,2811192,2770249,2752605,2717082,2717075,2717021,2702452,2702255,2701335,2681555,2680174,2674471,2674450,2674399,2671354,2671353,2671017,2670979,2669776,2672969,2672977,0,11,442,686,1368,221]
#9
⏱️ 13.16 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[67325035,10895359,2188833,2193264,10868861,2190184,2188878,2189036,2193467,2188562,29559165,2181587,29559889,2182827,33336915,10870207,10870317,10890470,33337909,33343723,2185093,31208324,33340706,77842824,29570718,41360007,10866245,10867726,10867602,67833887]
#10
⏱️ 1.05 мс
select * from "stores" where "stores"."id" in (11, 442)
#11
⏱️ 4.08 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["akko"]
#12
⏱️ 1.77 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 2.35 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]