#1
⏱️ 243.79 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"petah-tikva"]
#2
⏱️ 1708.34 мс
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",18,152,216,732,750,771,103,1145,1211,1239,1246,1262,1306,1328,1334,174,224,448,484,503,504,505,1354,553,575,579,648,655,662,681,688,689,104,308,34,35,146,190,191,257,276,324,330,338,356,391,true,18,152,216,732,750,771,103,1145,1211,1239,1246,1262,1306,1328,1334,174,224,448,484,503,504,505,1354,553,575,579,648,655,662,681,688,689,104,308,34,35,146,190,191,257,276,324,330,338,356,391]
#3
⏱️ 1267.7 мс
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",18,152,216,732,750,771,103,1145,1211,1239,1246,1262,1306,1328,1334,174,224,448,484,503,504,505,1354,553,575,579,648,655,662,681,688,689,104,308,34,35,146,190,191,257,276,324,330,338,356,391,true,18,152,216,732,750,771,103,1145,1211,1239,1246,1262,1306,1328,1334,174,224,448,484,503,504,505,1354,553,575,579,648,655,662,681,688,689,104,308,34,35,146,190,191,257,276,324,330,338,356,391]
#4
⏱️ 14.97 мс
select * from "canonical_products" where "canonical_products"."id" in (109, 117)
#5
⏱️ 7.1 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[117,109]
#6
⏱️ 54.11 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8775716,7529533,7520039,7455589,7455588,7065236,6745776,6730411,4989781,4989766,4987587,4987518,4987434,4987359,4987332,4987208,4987001,4986833,4986722,4986611,4986361,4984139,4983944,4546323,4541335,4536333,4528693,4279044,4225438,4210059,4193606,4188615,4592992,4679481,100076,9960259,4016585,149368,2663583,true,18,152,216,732,750,771,103,1145,1211,1239,1246,1262,1306,1328,1334,174,224,448,484,503,504,505,1354,553,575,579,648,655,662,681,688,689,104,308,34,35,146,190,191,257,276,324,330,338,356,391]
#7
⏱️ 12.36 мс
select * from "stores" where "stores"."id" in (18, 34, 35, 103, 104, 146, 152, 308, 324, 330, 338, 356, 391, 732)
#8
⏱️ 52.75 мс
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 = 4541335 THEN 4541335 WHEN sp.master_product_id = 4592992 THEN 4541335 WHEN sp.master_product_id = 4679481 THEN 4541335 WHEN sp.master_product_id = 100076 THEN 4541335 WHEN sp.master_product_id = 9960259 THEN 4546323 WHEN sp.master_product_id = 4016585 THEN 4546323 WHEN sp.master_product_id = 4546323 THEN 4546323 WHEN sp.master_product_id = 149368 THEN 4546323 WHEN sp.master_product_id = 2663583 THEN 4546323 ELSE sp.master_product_id END limit 500
Bindings:
[8775716,7529533,7520039,7455589,7455588,7065236,6745776,6730411,4989781,4989766,4987587,4987518,4987434,4987359,4987332,4987208,4987001,4986833,4986722,4986611,4986361,4984139,4983944,4546323,4541335,4536333,4528693,4279044,4225438,4210059,4193606,4188615,4592992,4679481,100076,9960259,4016585,149368,2663583,0,18,152,216,732,750,771,103,1145,1211,1239,1246,1262,1306,1328,1334,174,224,448,484,503,504,505,1354,553,575,579,648,655,662,681,688,689,104,308,34,35,146,190,191,257,276,324,330,338,356,391]
#9
⏱️ 53.67 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[74737464,6077959,67324972,5551522,67324968,796689,68604460,4268063,68791414,4765800,67682306,5202936,67596154,4872606,78882940,686319,1050491,1068518,78882910,4374912,779483,69315045,1358694,2246119,11039078,11043396,13431081,47611722,56565205,56564723,56565687,56565688,12259136,12259496,30370753,2608006,2608007,19038505,62768244,19048301,19046713,30376374,2610969,2610970,12262559,30380042,12270681,30381294,2618658,2618659,19058805,24757083,24762094,3549124,3547130,60423675,3677733,78672947,9603698,9593118,1734448,6777096,6777867,6777378,3132472,7705405,7717146,2778617,3125871,3126066,3128288,3128538,3128649,3128760,3128928,3129135,3129259,3129286,3129361,3129445,3129514,3131693,3131708]
#10
⏱️ 6.08 мс
select * from "stores" where "stores"."id" in (18, 34, 35, 103, 104, 146, 152, 308, 324, 330, 338, 356, 391, 448, 484, 503, 504, 505, 553, 575, 579, 732, 750, 771)
#11
⏱️ 10.69 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["petah-tikva"]
#12
⏱️ 9.14 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 12.27 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]