#1
⏱️ 147.51 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"ramla"]
#2
⏱️ 3392.97 мс
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:
["household","cleaning_paper",462,470,521,true,462,470,521]
#3
⏱️ 823.2 мс
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:
["household","cleaning_paper",462,470,521,true,462,470,521]
#4
⏱️ 6.9 мс
select * from "canonical_products" where "canonical_products"."id" in (25)
#5
⏱️ 10.7 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[25]
#6
⏱️ 20.48 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?)
Bindings:
[24332368,8775654,4649624,3916772,3837230,3340041,2987725,2987724,2807242,2742043,2715904,2702341,2663179,2657391,2634735,2633336,2613163,1911330,1515272,1452163,1432357,1429495,1428988,1428855,1428344,1428342,1426508,1426398,1421419,994293,788548,680650,2676233,2657025,true,462,470,521]
#7
⏱️ 8.14 мс
select * from "stores" where "stores"."id" in (521)
#8
⏱️ 22.22 мс
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 = 2676233 THEN 2657391 WHEN sp.master_product_id = 2657391 THEN 2657391 WHEN sp.master_product_id = 2657025 THEN 2657391 WHEN sp.master_product_id = 2702341 THEN 2657391 ELSE sp.master_product_id END limit 500
Bindings:
[24332368,8775654,4649624,3916772,3837230,3340041,2987725,2987724,2807242,2742043,2715904,2702341,2663179,2657391,2634735,2633336,2613163,1911330,1515272,1452163,1432357,1429495,1428988,1428855,1428344,1428342,1426508,1426398,1421419,994293,788548,680650,2676233,2657025,0,462,470,521]
#9
⏱️ 41.41 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[11560148,2410833,11579662,29973746,11548624,11548627,11549841,29970244,11566233,2414124,11552316,33560839,2410798,68207615,11571852,11556888,2410812,11576620,2407795,33674442,11819219,31537903,33671362,33676982,33677370,33660883,33660891,31537874,33677266,31537016,11829850,30138600,33671283,11839112,33673373,31526447,31528500,11839127,33658976,33658983,11834481,30137634,4025149,9603574,9570247,9581356,9798205]
#10
⏱️ 5.12 мс
select * from "stores" where "stores"."id" in (462, 470, 521)
#11
⏱️ 11.08 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["ramla"]
#12
⏱️ 11.65 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 20.72 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]