#1
⏱️ 31.94 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"haifa"]
#2
⏱️ 420.43 мс
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",13,1111,707,202,716,734,721,102,220,309,323,1140,1156,1207,1244,1275,583,1291,1292,657,1345,9,8,49,52,57,61,62,67,72,422,434,468,472,474,1356,558,658,671,1369,1388,366,12,15,28,701,74,89,137,211,233,319,331,true,13,1111,707,202,716,734,721,102,220,309,323,1140,1156,1207,1244,1275,583,1291,1292,657,1345,9,8,49,52,57,61,62,67,72,422,434,468,472,474,1356,558,658,671,1369,1388,366,12,15,28,701,74,89,137,211,233,319,331]
#3
⏱️ 198.1 мс
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",13,1111,707,202,716,734,721,102,220,309,323,1140,1156,1207,1244,1275,583,1291,1292,657,1345,9,8,49,52,57,61,62,67,72,422,434,468,472,474,1356,558,658,671,1369,1388,366,12,15,28,701,74,89,137,211,233,319,331,true,13,1111,707,202,716,734,721,102,220,309,323,1140,1156,1207,1244,1275,583,1291,1292,657,1345,9,8,49,52,57,61,62,67,72,422,434,468,472,474,1356,558,658,671,1369,1388,366,12,15,28,701,74,89,137,211,233,319,331]
#4
⏱️ 1.53 мс
select * from "canonical_products" where "canonical_products"."id" in (8)
#5
⏱️ 0.79 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[8]
#6
⏱️ 59.34 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8775716,7065236,6745776,6730411,4987518,4536333,4402031,4225438,4131723,4130111,4130102,4085428,4075884,4061313,4038041,4018216,4017115,4006000,4002672,4002085,3997644,3990586,3988472,3985219,3980651,3980340,3973282,3972362,3971210,3739767,3041110,2717082,3170808,1462716,123050,160427,2812826,true,13,1111,707,202,716,734,721,102,220,309,323,1140,1156,1207,1244,1275,583,1291,1292,657,1345,9,8,49,52,57,61,62,67,72,422,434,468,472,474,1356,558,658,671,1369,1388,366,12,15,28,701,74,89,137,211,233,319,331]
#7
⏱️ 1.52 мс
select * from "stores" where "stores"."id" in (15, 102, 137, 309, 323, 366, 701, 734)
#8
⏱️ 15.52 мс
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 = 3170808 THEN 3041110 WHEN sp.master_product_id = 1462716 THEN 3041110 WHEN sp.master_product_id = 123050 THEN 3041110 WHEN sp.master_product_id = 3041110 THEN 3041110 WHEN sp.master_product_id = 160427 THEN 3041110 WHEN sp.master_product_id = 2812826 THEN 3041110 ELSE sp.master_product_id END limit 500
Bindings:
[8775716,7065236,6745776,6730411,4987518,4536333,4402031,4225438,4131723,4130111,4130102,4085428,4075884,4061313,4038041,4018216,4017115,4006000,4002672,4002085,3997644,3990586,3988472,3985219,3980651,3980340,3973282,3972362,3971210,3739767,3041110,2717082,3170808,1462716,123050,160427,2812826,0,13,1111,707,202,716,734,721,102,220,309,323,1140,1156,1207,1244,1275,583,1291,1292,657,1345,9,8,49,52,57,61,62,67,72,422,434,468,472,474,1356,558,658,671,1369,1388,366,12,15,28,701,74,89,137,211,233,319,331]
#9
⏱️ 32.12 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[67325025,68619285,67811914,5088266,78882927,78882899,1945138,30992335,10455050,10455398,10455222,33220509,2073195,24181720,10636425,10640195,10639352,11799824,11790990,35582715,30108984,30110931,30110019,11890674,30153667,11899939,11899778,11949364,11952127,11953602,11952366,24809362,78410347,3579746,59796258,59813125,78418318,24811641,78397784,78398504,59825302,3578369,59809972,78397796,3405809,78854836,25065474,24487776,24485301,24459016,24456410,24459014,24486440,3409264,67324858,3320509,78774670,3312717,3313658,3788624,3322241,3327220,3312463,3314574,3321611,3326034,3326616,13182262,17808782,24311763,26658162,24985284,78778494,9603700,9593120]
#10
⏱️ 1.6 мс
select * from "stores" where "stores"."id" in (15, 102, 137, 309, 323, 366, 422, 434, 468, 472, 474, 558, 583, 701, 707, 734)
#11
⏱️ 4.84 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["haifa"]
#12
⏱️ 3.79 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 3.41 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]