#1
⏱️ 86.64 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"jerusalem"]
#2
⏱️ 5773.01 мс
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:
["household","cleaning_paper",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
⏱️ 1684.47 мс
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:
["household","cleaning_paper",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
⏱️ 3.69 мс
select * from "canonical_products" where "canonical_products"."id" in (12, 25, 38)
#5
⏱️ 1.04 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?)
Bindings:
[12,25,38]
#6
⏱️ 98.9 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[24332368,10880869,8775654,7486186,7473385,4649624,4531886,3411661,3340041,3143981,2987725,2987724,2807242,2742043,2715904,2702341,2672991,2672977,2672969,2671097,2663179,2657391,2634735,2633336,2613163,2413856,2413855,2178279,2049531,1911330,1879230,1515272,2956794,2676233,2657025,2681555,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
⏱️ 2.72 мс
select * from "stores" where "stores"."id" in (6, 69, 106, 109, 114, 143, 149, 208, 259, 268, 274, 278, 279, 281, 286, 306, 315, 320, 332, 535, 700, 727, 728, 745, 746, 775, 1110, 1126, 1166, 1186, 1210, 1220, 1229, 1263, 1286, 1301, 1308, 1313, 1318, 1319, 1336, 1344, 1371, 1385, 1386, 1409)
#8
⏱️ 18.07 мс
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 = 2956794 THEN 3411661 WHEN sp.master_product_id = 3411661 THEN 3411661 WHEN sp.master_product_id = 2676233 THEN 2657391 WHEN sp.master_product_id = 2657391 THEN 2657391 WHEN sp.master_product_id = 2657025 THEN 2657391 WHEN sp.master_product_id = 2702341 THEN 2657391 WHEN sp.master_product_id = 2681555 THEN 2672969 WHEN sp.master_product_id = 2672969 THEN 2672969 WHEN sp.master_product_id = 2672977 THEN 2672969 ELSE sp.master_product_id END limit 500
Bindings:
[24332368,10880869,8775654,7486186,7473385,4649624,4531886,3411661,3340041,3143981,2987725,2987724,2807242,2742043,2715904,2702341,2672991,2672977,2672969,2671097,2663179,2657391,2634735,2633336,2613163,2413856,2413855,2178279,2049531,1911330,1879230,1515272,2956794,2676233,2657025,2681555,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
⏱️ 32.43 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6501534,6501535,10964094,27869547,6545066,12922172,25396024,5428227,5737046,5701433,5635312,5464369,17009638,17009639,4833414,4576481,2011994,2003422,2001017,2007260,2007315,2002372,10496928,10500854,10504401,10695604,77725728,2100003,2100450,10690452,33255730,10691896,10711278,2100630,10688808,67748035,77728731,2099904,2119512,10718483,2114616,31138574,31146111,67758551,67762035,29498181,10717438,77734648,33272687,10725945,2396689,33553482,11510995,29945680,11508265,29951703,29952385,2399242,33551003,11514108,10364553,10360603,1845423,67511331,10363133,10363206,1846520,1848893,29241253,29246533,29246534,77490369,1865623,10378314,10372947,33032869,1861232,1864882,29247948,29250660,33033126,67531434,67531435,56570440,33808358,12097290,2534924,2538512,47650859,2538525,56575862,4025160,9603576,9570249,9581358,9798207,4025127,9440791,9440539,9440602,9618129,4025128,9603556,9570229,9581338,9798187,1661415,1659190,1659695,1654961,1661422,1668487,9989323,9989328,9989117,1672627,199085,200154,1673578,1677035,1680607]
#10
⏱️ 1.29 мс
select * from "stores" where "stores"."id" in (106, 109, 149, 274, 278, 279, 281, 286, 315, 320, 332, 429, 436, 437, 461, 482, 483, 485, 486, 535, 727, 728, 745, 746)
#11
⏱️ 2.39 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["jerusalem"]
#12
⏱️ 2.13 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 3.13 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]