#1
⏱️ 79.76 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"petah-tikva"]
#2
⏱️ 1482.83 мс
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","baking_spices",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
⏱️ 1122.15 мс
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","baking_spices",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
⏱️ 11.53 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[12196449,12196440,4990576,4990374,4988227,4987429,4529792,4174891,4107700,4060426,4034589,4031498,4030805,4002769,3991036,3984999,3973055,3458976,2842852,2702452,2680174,2670979,2666098,2666027,2663549,2640775,2640774,2608194,1959857,1908616,1908615,1555430,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]
#5
⏱️ 3.18 мс
select * from "stores" where "stores"."id" in (104, 276)
#6
⏱️ 9.04 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[12196449,12196440,4990576,4990374,4988227,4987429,4529792,4174891,4107700,4060426,4034589,4031498,4030805,4002769,3991036,3984999,3973055,3458976,2842852,2702452,2680174,2670979,2666098,2666027,2663549,2640775,2640774,2608194,1959857,1908616,1908615,1555430,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]
#7
⏱️ 3.11 мс
select * from "stores" where "stores"."id" in (104, 276, 448, 484, 503, 504, 505, 553, 575, 579, 750, 771)
#8
⏱️ 6.32 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["petah-tikva"]
#9
⏱️ 5.79 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#10
⏱️ 5.83 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]