#1
⏱️ 39.34 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"rishon-le-zion"]
#2
⏱️ 1461.5 мс
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",129,731,749,769,126,399,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,true,129,731,749,769,126,399,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]
#3
⏱️ 489.97 мс
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",129,731,749,769,126,399,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,true,129,731,749,769,126,399,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]
#4
⏱️ 7.42 мс
select * from "canonical_products" where "canonical_products"."id" in (109, 117)
#5
⏱️ 2.01 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[109,117]
#6
⏱️ 371.15 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8775716,7798881,7455589,7455588,7065236,6745776,6730411,4989781,4989766,4987587,4987518,4987434,4987359,4987332,4987208,4987001,4986833,4986722,4986611,4986361,4984139,4983944,4702695,4679481,4592992,4546323,4541335,4540288,4540285,4536333,4535016,4528693,100076,9960259,4016585,149368,2663583,true,129,731,749,769,126,399,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]
#7
⏱️ 6.78 мс
select * from "stores" where "stores"."id" in (3, 22, 92, 116, 126, 129, 150, 299, 321, 343, 365, 399, 731)
#8
⏱️ 37.72 мс
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 = 149368 THEN 4546323 WHEN sp.master_product_id = 4546323 THEN 4546323 WHEN sp.master_product_id = 2663583 THEN 4546323 ELSE sp.master_product_id END limit 500
Bindings:
[8775716,7798881,7455589,7455588,7065236,6745776,6730411,4989781,4989766,4987587,4987518,4987434,4987359,4987332,4987208,4987001,4986833,4986722,4986611,4986361,4984139,4983944,4702695,4679481,4592992,4546323,4541335,4540288,4540285,4536333,4535016,4528693,100076,9960259,4016585,149368,2663583,0,129,731,749,769,126,399,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]
#9
⏱️ 57.49 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[67378549,6384218,5951355,4842243,68293228,6512162,68004356,6240938,67962653,6171059,67612408,4959092,994248,705156,78882947,744302,6109819,69315040,1419629,10419009,10415378,10416685,10416023,29847147,11382727,29861339,16049807,19113353,30394793,30393979,30397534,30397535,19121203,30398758,19125983,30404398,30404399,78139648,78032719,2839389,2833785,2839251,2839254,7831298,2845673,3170945,3171140,3173362,3173612,3173723,3173834,3174002,3174209,3174333,3174360,3174435,3174519,3174588,3176767,3176782,3222640,2906070,7967586,3216039,3216234,3218456,3218706,3218817,3218928,3219096,3219303,3219427,3219454,3219529,3219613,3219682,3221861,3221876,9603697,9593117,1720092,6761956,6762469,6762074,3117477,11866923,11881724,11884723,11900062,3110876,3111071,3113293,3113543,3113654,3113765,3113933,3114140,3114264,3114291,3114366,3114450,3114519,3116698,3116713,25757364]
#10
⏱️ 5.93 мс
select * from "stores" where "stores"."id" in (3, 22, 92, 116, 126, 129, 150, 299, 321, 343, 365, 399, 427, 457, 508, 509, 547, 586, 600, 617, 731, 749, 769)
#11
⏱️ 2.62 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["rishon-le-zion"]
#12
⏱️ 6.42 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 4.78 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]