#1
⏱️ 140.42 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"netanya"]
#2
⏱️ 1156.3 мс
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",1113,708,739,753,773,236,96,112,1326,1173,1224,1311,1315,407,59,64,428,438,451,476,499,500,1390,554,619,664,1395,36,105,95,144,205,219,229,256,267,325,true,1113,708,739,753,773,236,96,112,1326,1173,1224,1311,1315,407,59,64,428,438,451,476,499,500,1390,554,619,664,1395,36,105,95,144,205,219,229,256,267,325]
#3
⏱️ 154.9 мс
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",1113,708,739,753,773,236,96,112,1326,1173,1224,1311,1315,407,59,64,428,438,451,476,499,500,1390,554,619,664,1395,36,105,95,144,205,219,229,256,267,325,true,1113,708,739,753,773,236,96,112,1326,1173,1224,1311,1315,407,59,64,428,438,451,476,499,500,1390,554,619,664,1395,36,105,95,144,205,219,229,256,267,325]
#4
⏱️ 1.56 мс
select * from "canonical_products" where "canonical_products"."id" in (109, 117)
#5
⏱️ 0.91 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[117,109]
#6
⏱️ 184.75 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8775716,7529533,7520039,7504693,7455589,7455588,7065236,6745776,6730411,4989781,4989766,4987587,4987518,4987434,4987359,4987332,4987208,4987001,4986833,4986722,4986611,4986361,4984139,4983944,4908582,4546323,4541335,4540288,4540285,4536333,4535016,4528693,4592992,4679481,100076,9960259,4016585,149368,2663583,true,1113,708,739,753,773,236,96,112,1326,1173,1224,1311,1315,407,59,64,428,438,451,476,499,500,1390,554,619,664,1395,36,105,95,144,205,219,229,256,267,325]
#7
⏱️ 1.13 мс
select * from "stores" where "stores"."id" in (36, 95, 96, 105, 112, 144, 325, 407, 739)
#8
⏱️ 7.61 мс
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,7504693,7455589,7455588,7065236,6745776,6730411,4989781,4989766,4987587,4987518,4987434,4987359,4987332,4987208,4987001,4986833,4986722,4986611,4986361,4984139,4983944,4908582,4546323,4541335,4540288,4540285,4536333,4535016,4528693,4592992,4679481,100076,9960259,4016585,149368,2663583,0,1113,708,739,753,773,236,96,112,1326,1173,1224,1311,1315,407,59,64,428,438,451,476,499,500,1390,554,619,664,1395,36,105,95,144,205,219,229,256,267,325]
#9
⏱️ 21.9 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5482152,69580714,6339448,4537733,4681585,68405004,6527917,67730251,545615,580932,4744518,67721875,1481515,1990309,24092824,10487459,29366467,2127500,10749739,10751778,10750659,11180918,13545177,33438125,29729381,31635927,56539956,31636897,30348025,30349080,30348845,2588753,2588754,18984498,78655807,56625298,12233771,12233775,31829384,30355765,47807752,78311747,2990508,2985079,2990376,2991384,2996497,12319461,12319656,12324643,12324893,12325508,12325619,12325787,12326494,12326618,12326645,12326720,12326804,12326873,12331820,12331835,3328712,9603705,9593125,10281996,10287768,10288376,10288171,3147464,7747784,7758556,7758559,7771991,12013508,3140863,3141058,3143280,3143530,3143641,3143752,3143920,3144127,3144251,3144278,3144353,3144437,3144506,3146685,3146700]
#10
⏱️ 2.19 мс
select * from "stores" where "stores"."id" in (36, 95, 96, 105, 112, 144, 219, 325, 407, 428, 438, 451, 476, 499, 500, 554, 619, 708, 739, 753, 773)
#11
⏱️ 3.37 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["netanya"]
#12
⏱️ 2.24 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 2.45 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]