#1
⏱️ 208.94 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"rishon-le-zion"]
#2
⏱️ 1213 мс
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:
["dairy","cheese",129,731,749,769,126,343,1142,1160,1230,1232,1261,586,1280,600,617,1305,1312,1321,1349,3,39,150,175,238,427,457,508,509,1352,547,578,685,690,691,1384,22,92,116,196,299,321,365,399,true,129,731,749,769,126,343,1142,1160,1230,1232,1261,586,1280,600,617,1305,1312,1321,1349,3,39,150,175,238,427,457,508,509,1352,547,578,685,690,691,1384,22,92,116,196,299,321,365,399]
#3
⏱️ 981.8 мс
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:
["dairy","cheese",129,731,749,769,126,343,1142,1160,1230,1232,1261,586,1280,600,617,1305,1312,1321,1349,3,39,150,175,238,427,457,508,509,1352,547,578,685,690,691,1384,22,92,116,196,299,321,365,399,true,129,731,749,769,126,343,1142,1160,1230,1232,1261,586,1280,600,617,1305,1312,1321,1349,3,39,150,175,238,427,457,508,509,1352,547,578,685,690,691,1384,22,92,116,196,299,321,365,399]
#4
⏱️ 5.07 мс
select * from "canonical_products" where "canonical_products"."id" in (199)
#5
⏱️ 15.2 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[199]
#6
⏱️ 91.3 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[36601256,11135534,8314242,4990037,4988786,4987083,4986561,4985410,4279811,4213380,4125470,4105860,4085256,4032127,3985099,3974567,2802677,2679096,2668917,2668915,2633414,2611955,2611893,2611880,2611879,2611240,2611239,2611238,1454587,1453876,1452649,1431397,4019922,true,129,731,749,769,126,343,1142,1160,1230,1232,1261,586,1280,600,617,1305,1312,1321,1349,3,39,150,175,238,427,457,508,509,1352,547,578,685,690,691,1384,22,92,116,196,299,321,365,399]
#7
⏱️ 0.86 мс
select * from "stores" where "stores"."id" in (3, 22, 92, 126, 129, 150, 321, 399)
#8
⏱️ 35.3 мс
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 = 4085256 THEN 4085256 WHEN sp.master_product_id = 4019922 THEN 4085256 ELSE sp.master_product_id END limit 500
Bindings:
[36601256,11135534,8314242,4990037,4988786,4987083,4986561,4985410,4279811,4213380,4125470,4105860,4085256,4032127,3985099,3974567,2802677,2679096,2668917,2668915,2633414,2611955,2611893,2611880,2611879,2611240,2611239,2611238,1454587,1453876,1452649,1431397,4019922,0,129,731,749,769,126,343,1142,1160,1230,1232,1261,586,1280,600,617,1305,1312,1321,1349,3,39,150,175,238,427,457,508,509,1352,547,578,685,690,691,1384,22,92,116,196,299,321,365,399]
#9
⏱️ 74.76 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[32803127,26335321,35272138,35248643,34956586,36361017,10414266,10417352,10417351,10419287,10419286,10422035,10419552,29293213,10417345,10417347,1912525,11371353,29846374,2347109,78147456,37518519,3495254,78180160,3495360,78138993,78180159,27830229,18177811,3700546,78042436,78042456,78075934,24600569,78044406,78044405,78073873,3177044,3174638,3174639,3174637,3174636,3170951,3174635,3174630,2834747,7819875,3172411,3173562,3174084,3175787,3177038,7961608,3222138,3219732,3219733,3219731,3219730,3216045,3219729,3219724,2903425,3217505,3218656,3219178,3220881,3222132,6771838,6771837,26415299,6772571,6764249,6772698,266864,6771832,6771833,1715104,3116975,3114569,3114570,3114568,3114567,3110882,3114566,3114561,2746931,3112342,3113493,3114015,3115718,3116969]
#10
⏱️ 14.73 мс
select * from "stores" where "stores"."id" in (3, 22, 126, 129, 150, 399, 427, 457, 547, 578, 586, 600, 617, 749, 769)
#11
⏱️ 10.32 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["rishon-le-zion"]
#12
⏱️ 13.62 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 14.81 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]