#1
⏱️ 155.2 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"holon"]
#2
⏱️ 767.26 мс
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",1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360,true,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#3
⏱️ 729.67 мс
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",1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360,true,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#4
⏱️ 26.58 мс
select * from "canonical_products" where "canonical_products"."id" in (284)
#5
⏱️ 17.24 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[284]
#6
⏱️ 20.88 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8775716,7529533,7520039,7504693,7499337,7455589,7455588,7065236,6745776,6730411,4987518,4536333,4344609,4260307,4215849,4131723,4130111,4127807,4061313,4038041,4036040,4018216,4006000,4002672,3997644,3990586,3985219,3980651,3980340,3972362,3971210,3739767,4315844,true,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#7
⏱️ 14.84 мс
select * from "stores" where "stores"."id" in (23, 145, 360, 528)
#8
⏱️ 23.35 мс
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 = 4215849 THEN 4215849 WHEN sp.master_product_id = 4315844 THEN 4215849 ELSE sp.master_product_id END limit 500
Bindings:
[8775716,7529533,7520039,7504693,7499337,7455589,7455588,7065236,6745776,6730411,4987518,4536333,4344609,4260307,4215849,4131723,4130111,4127807,4061313,4038041,4036040,4018216,4006000,4002672,3997644,3990586,3985219,3980651,3980340,3972362,3971210,3739767,4315844,0,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#9
⏱️ 25.08 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[67325002,67690693,78882908,11607288,104068245,13989268,11600291,13993447,90655838,30338673,12205817,31792203,42224456,104340018,12206923,47774543,56616534,2578271,9603711,9593131,78253987,98979107,98993048,99001203,24742736,3541767,24753078,98211245,98980177,3536778,3536979,24747635,3539525,97364115,24896033,60306703,24898063,78578907,78579056,24893833,3668019,32925594,6807182,10266334,6807493]
#10
⏱️ 14.78 мс
select * from "stores" where "stores"."id" in (23, 145, 360, 463, 497, 528, 552, 573, 752)
#11
⏱️ 18.47 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["holon"]
#12
⏱️ 22.15 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 13.42 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]