#1
⏱️ 94.14 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"beer-sheva"]
#2
⏱️ 1658.94 мс
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",93,736,754,776,246,271,113,1169,1170,1206,1249,1271,1274,1279,1299,1307,44,160,164,165,181,441,465,473,490,1370,1400,120,132,151,172,350,369,true,93,736,754,776,246,271,113,1169,1170,1206,1249,1271,1274,1279,1299,1307,44,160,164,165,181,441,465,473,490,1370,1400,120,132,151,172,350,369]
#3
⏱️ 1407.32 мс
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",93,736,754,776,246,271,113,1169,1170,1206,1249,1271,1274,1279,1299,1307,44,160,164,165,181,441,465,473,490,1370,1400,120,132,151,172,350,369,true,93,736,754,776,246,271,113,1169,1170,1206,1249,1271,1274,1279,1299,1307,44,160,164,165,181,441,465,473,490,1370,1400,120,132,151,172,350,369]
#4
⏱️ 16.9 мс
select * from "canonical_products" where "canonical_products"."id" in (40, 42, 115, 122)
#5
⏱️ 9.25 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?, ?)
Bindings:
[40,42,115,122]
#6
⏱️ 22.85 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[7441737,3458976,2975340,2842852,2702452,2680174,2670979,2666098,2666027,2663549,2640775,2640774,2608194,2566125,2564252,2564251,2564247,2564190,2562417,2562151,2562038,2562031,2562023,2562022,2562011,2561394,2561392,2561391,2561387,1474523,1472108,1472107,2561626,2562064,2562016,2561482,true,93,736,754,776,246,271,113,1169,1170,1206,1249,1271,1274,1279,1299,1307,44,160,164,165,181,441,465,473,490,1370,1400,120,132,151,172,350,369]
#7
⏱️ 10.08 мс
select * from "stores" where "stores"."id" in (172, 181, 246, 271)
#8
⏱️ 24.81 мс
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 = 2561387 THEN 2561387 WHEN sp.master_product_id = 2561626 THEN 2562038 WHEN sp.master_product_id = 2562031 THEN 2562031 WHEN sp.master_product_id = 2562064 THEN 2562031 WHEN sp.master_product_id = 2562016 THEN 2561394 WHEN sp.master_product_id = 2564247 THEN 2561387 WHEN sp.master_product_id = 2562038 THEN 2562038 WHEN sp.master_product_id = 2561394 THEN 2561394 WHEN sp.master_product_id = 2561482 THEN 2562038 ELSE sp.master_product_id END limit 500
Bindings:
[7441737,3458976,2975340,2842852,2702452,2680174,2670979,2666098,2666027,2663549,2640775,2640774,2608194,2566125,2564252,2564251,2564247,2564190,2562417,2562151,2562038,2562031,2562023,2562022,2562011,2561394,2561392,2561391,2561387,1474523,1472108,1472107,2561626,2562064,2562016,2561482,0,93,736,754,776,246,271,113,1169,1170,1206,1249,1271,1274,1279,1299,1307,44,160,164,165,181,441,465,473,490,1370,1400,120,132,151,172,350,369]
#9
⏱️ 54.91 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4908331,4908335,4908336,4908338,4911223,4911224,4911227,4911235,4908419,4911455,4913554,4922419,4922488,4922489,4911460,4743066,4753986,5318341,107125198,5221105,2172141,2167052,2167095,2173802,2177201,2176932,2178854,31199878,2168821,31194820,77803655,11676140,11666882,2438435,31482649,31482665,2444199,31482689,33605848,2438098,2439325,30036343,79786371,33730302,2489758,89913626,89928517,11928804,89913538,89908938,11910275,11913524,2490475,56584883,30282402,90446902,90430067,90440649,90429725,12130117,10301249,1790005,1790006,1981611,1970754,32952099,32944807,1973004,1782304]
#10
⏱️ 13.11 мс
select * from "stores" where "stores"."id" in (172, 181, 246, 271, 441, 465, 473, 490, 754)
#11
⏱️ 14.47 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["beer-sheva"]
#12
⏱️ 14.19 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 11.39 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]