#1
⏱️ 65.06 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"jerusalem"]
#2
⏱️ 1719.49 мс
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",1110,83,114,143,727,728,745,746,759,775,315,320,106,170,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,85,166,279,429,436,437,461,485,486,535,1371,1385,1386,1409,6,700,87,88,109,149,171,208,259,268,278,281,286,274,306,332,true,1110,83,114,143,727,728,745,746,759,775,315,320,106,170,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,85,166,279,429,436,437,461,485,486,535,1371,1385,1386,1409,6,700,87,88,109,149,171,208,259,268,278,281,286,274,306,332]
#3
⏱️ 1067.68 мс
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",1110,83,114,143,727,728,745,746,759,775,315,320,106,170,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,85,166,279,429,436,437,461,485,486,535,1371,1385,1386,1409,6,700,87,88,109,149,171,208,259,268,278,281,286,274,306,332,true,1110,83,114,143,727,728,745,746,759,775,315,320,106,170,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,85,166,279,429,436,437,461,485,486,535,1371,1385,1386,1409,6,700,87,88,109,149,171,208,259,268,278,281,286,274,306,332]
#4
⏱️ 6.72 мс
select * from "canonical_products" where "canonical_products"."id" in (8, 38, 242)
#5
⏱️ 3.54 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?)
Bindings:
[8,38,242]
#6
⏱️ 672.89 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8775716,7499337,7455589,7455588,7065236,6745776,6730411,4987518,4536333,3739767,3646497,3041110,2864978,2717082,2717075,2717021,2701771,2681555,2674471,2671354,2659225,2645643,1954840,1931249,1918287,1915186,1915185,1912286,1912018,1911972,1910474,1909369,1462716,3170808,123050,160427,2812826,2672969,2672977,4227275,true,1110,83,114,143,727,728,745,746,759,775,315,320,106,170,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,85,166,279,429,436,437,461,485,486,535,1371,1385,1386,1409,6,700,87,88,109,149,171,208,259,268,278,281,286,274,306,332]
#7
⏱️ 4.46 мс
select * from "stores" where "stores"."id" in (6, 83, 85, 87, 88, 106, 109, 114, 143, 149, 274, 278, 279, 281, 286, 306, 332, 535, 700, 727, 728, 745, 746)
#8
⏱️ 28.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 = 1462716 THEN 3041110 WHEN sp.master_product_id = 3170808 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 WHEN sp.master_product_id = 2681555 THEN 2681555 WHEN sp.master_product_id = 2672969 THEN 2681555 WHEN sp.master_product_id = 2672977 THEN 2681555 WHEN sp.master_product_id = 1915185 THEN 1915185 WHEN sp.master_product_id = 4227275 THEN 1915185 ELSE sp.master_product_id END limit 500
Bindings:
[8775716,7499337,7455589,7455588,7065236,6745776,6730411,4987518,4536333,3739767,3646497,3041110,2864978,2717082,2717075,2717021,2701771,2681555,2674471,2671354,2659225,2645643,1954840,1931249,1918287,1915186,1915185,1912286,1912018,1911972,1910474,1909369,1462716,3170808,123050,160427,2812826,2672969,2672977,4227275,0,1110,83,114,143,727,728,745,746,759,775,315,320,106,170,1126,1166,482,483,1186,1210,1220,1229,1263,1286,1301,1308,1313,1318,1319,1336,1344,66,69,77,78,85,166,279,429,436,437,461,485,486,535,1371,1385,1386,1409,6,700,87,88,109,149,171,208,259,268,278,281,286,274,306,332]
#9
⏱️ 66.23 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[67358517,4798657,4804914,4804956,4807634,4792822,4792823,4804821,4795717,4746644,4749915,4749954,4750532,4740260,4749834,4700741,4704171,4706211,4698223,4678108,4684072,4684108,85128291,4683969,68564555,68492629,68367919,67761637,67620935,4955703,5418230,5423448,5432970,5433013,5433285,5415934,5415935,5432855,5420707,5727284,5732008,23280027,5742068,5742349,5724476,5724477,5739633,5739613,5691092,5696341,5705690,5705734,5706108,5688769,5688770,5623878,5630763,5638278,5638320,5640697,5623394,5623395,5638158,5626508,5452990,5459609,5467223,5469566,5469870,5452694,5467000,78882953,4567706,2002760,2004930,10513088,2007260,2000997,29375781,13006757,10518913,10518850,2103602,2099075,2099992,2107473,10691896,10689935,2100245,2100352,2110967,31130576,10690627,10692705,10691761,10742025,31139916,29497151,10730277,67758551,29497504,29497661,2111864,2112008,24227872,10720406,2114209,2113974,2398114,11515224,29951703,11534843,2398295,2398335,2398424,2394587,31429951,11540879,18267369,11540881,1855092,10370781,10363133,1846178,1845790,29238868,10365208,10370921,15266367,29259713,10380971,1863678,1861232,29247589,1863354,29251262,10374614,29249024,10375708,30254841,33808358,12094624,31697111,33813273,33812646,33813451,33813452,2537088,47650859,31706757,56575507,12103023,47639642,47636972,47639872,47639873,9603714,9593134,67324854,9440782,9440721,9603694,9593114,1668747,9989323,1655961,15072363,15073268,10175189,9989783,1675250,1681554,1677035,1674126,6726755,6727160,6726851]
#10
⏱️ 3.42 мс
select * from "stores" where "stores"."id" in (6, 83, 85, 87, 88, 106, 109, 114, 143, 149, 170, 274, 278, 279, 281, 286, 306, 332, 429, 436, 437, 461, 482, 483, 485, 486, 535, 700, 727, 728, 745, 746)
#11
⏱️ 1.48 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["jerusalem"]
#12
⏱️ 1.09 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 1.45 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]