#1
⏱️ 130.97 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"jerusalem"]
#2
⏱️ 2513.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",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
⏱️ 625.07 мс
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",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
⏱️ 1.72 мс
select * from "canonical_products" where "canonical_products"."id" in (64, 180)
#5
⏱️ 0.76 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[180,64]
#6
⏱️ 465.06 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6809522,3246016,3023008,2976308,2975340,2975183,2842852,2702452,2680174,2670979,2666098,2666027,2663549,2640775,2640774,2608194,1980207,1980205,1980091,1908616,1908615,1474523,1472108,1472107,1469150,1466106,1466101,1465150,1461377,1460855,1457784,1456497,130435,3855719,4055598,162816,160964,4526787,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
⏱️ 8.99 мс
select * from "stores" where "stores"."id" in (83, 85, 87, 208, 259, 268, 274, 278, 279, 281, 286, 745, 746)
#8
⏱️ 23.82 мс
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 = 1465150 THEN 1465150 WHEN sp.master_product_id = 130435 THEN 1465150 WHEN sp.master_product_id = 3855719 THEN 1980207 WHEN sp.master_product_id = 1980207 THEN 1980207 WHEN sp.master_product_id = 4055598 THEN 1980207 WHEN sp.master_product_id = 162816 THEN 1980207 WHEN sp.master_product_id = 160964 THEN 1980207 WHEN sp.master_product_id = 4526787 THEN 1980207 ELSE sp.master_product_id END limit 500
Bindings:
[6809522,3246016,3023008,2976308,2975340,2975183,2842852,2702452,2680174,2670979,2666098,2666027,2663549,2640775,2640774,2608194,1980207,1980205,1980091,1908616,1908615,1474523,1472108,1472107,1469150,1466106,1466101,1465150,1461377,1460855,1457784,1456497,130435,3855719,4055598,162816,160964,4526787,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
⏱️ 63.26 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4795799,4743912,4698285,4973420,4982420,4998200,5000708,4970302,4973413,4973418,4995185,4916238,4925036,4943288,4946467,6281800,6281801,31883243,5079266,5091944,5105409,5420841,5415737,5412913,5412914,5729495,5744293,5724245,5721882,5721883,5693712,5688543,5686179,5686180,5628009,5621438,5621117,5621118,5456910,5450460,5450127,5450128,5445163,5445283,5445285,33154928,2004132,2013301,2007125,10516716,2003704,1999785,2000116,10519700,2004868,2002213,10496483,2005578,2102943,29487621,2098615,10689515,2102508,2104069,77726711,2107635,2101571,10690631,2098056,77726921,2116534,29499631,2111900,2112346,29489549,29491332,33274507,29496912,29488079,10718722,10717739,33274782,2400386,11513962,11509718,2392696,2392697,2402458,2402472,2402496,2400946,2394174,2402577,1849612,1847174,10361689,10359670,10359692,1850326,1851312,1852908,1854956,1848844,10358253,1845431,29233949,29234108,29235086,1858260,29251435,1860528,33033200,1865486,1865503,1865889,1866330,29256359,1867460,10378017,1860757,29246817,67520143,67520391,67521555,1866261,29259277,33809330,33815978,2538556,2538829,30268485,2537094,47653982,1660533,1663941,1659865,1668635,1668636,1661794,1664366,1664435,1668370,1679592,1679801,1673299,1675562,1681326,1682977,1674274,1672329]
#10
⏱️ 6.22 мс
select * from "stores" where "stores"."id" in (83, 85, 87, 170, 171, 208, 259, 268, 274, 278, 279, 281, 286, 429, 436, 437, 461, 482, 483, 485, 486, 745, 746)
#11
⏱️ 5.69 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["jerusalem"]
#12
⏱️ 6.52 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 5.02 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]