#1
⏱️ 148.99 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"eilat"]
#2
⏱️ 2377.89 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))) and master_products.id IN (
SELECT DISTINCT ON (COALESCE(canonical_product_id, -id)) id
FROM master_products
WHERE category_slug = ?
ORDER BY COALESCE(canonical_product_id, -id),
CASE WHEN image_url IS NOT NULL AND image_url != '' THEN 0 ELSE 1 END,
id DESC
)
Bindings:
["produce",1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363,true,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363,"produce"]
#3
⏱️ 1720.09 мс
select * from "master_products" where "barcode" is not null and "category_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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))) and master_products.id IN (
SELECT DISTINCT ON (COALESCE(canonical_product_id, -id)) id
FROM master_products
WHERE category_slug = ?
ORDER BY COALESCE(canonical_product_id, -id),
CASE WHEN image_url IS NOT NULL AND image_url != '' THEN 0 ELSE 1 END,
id DESC
) 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:
["produce",1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363,true,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363,"produce"]
#4
⏱️ 6.5 мс
select * from "canonical_products" where "canonical_products"."id" in (7, 8, 11, 71, 84, 90, 139, 170, 193, 238)
#5
⏱️ 7.15 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[238,193,71,84,139,90,7,11,8,170]
#6
⏱️ 143.29 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8897354,7529293,7493489,7477797,7461021,7455068,7454739,7452710,7446739,7443230,7441884,7439517,7431628,6744655,6709207,6708345,4983751,4039359,3995178,3929128,3915123,3864304,3745830,3713449,3700683,3700048,3677696,3676089,3675179,3385632,3170808,3067885,809367,420472,98565,864799,764101,1909820,95379,1454922,337070,2927777,1945358,2769595,123105,165505,368474,374223,199262,154873,2317173,112362,127029,2629564,130085,95617,1462716,3261507,2950238,2742300,101044,1458061,3015043,750862,101043,97463,1907886,1909941,133465,123050,3041110,406907,322317,150733,2901961,3549846,160427,1930007,96458,205836,134045,109029,94867,112818,102244,109100,94974,133472,102185,2712622,101339,170223,2812826,122806,122841,190887,127440,124804,95010,129463,101042,2639215,true,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363]
#7
⏱️ 7.17 мс
select * from "stores" where "stores"."id" in (21, 123, 148, 363)
#8
⏱️ 120.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 = 809367 THEN 3675179 WHEN sp.master_product_id = 420472 THEN 3675179 WHEN sp.master_product_id = 98565 THEN 3675179 WHEN sp.master_product_id = 864799 THEN 3713449 WHEN sp.master_product_id = 764101 THEN 3675179 WHEN sp.master_product_id = 1909820 THEN 7477797 WHEN sp.master_product_id = 95379 THEN 3675179 WHEN sp.master_product_id = 1454922 THEN 7461021 WHEN sp.master_product_id = 3067885 THEN 3067885 WHEN sp.master_product_id = 337070 THEN 3675179 WHEN sp.master_product_id = 2927777 THEN 7477797 WHEN sp.master_product_id = 1945358 THEN 3675179 WHEN sp.master_product_id = 3713449 THEN 3713449 WHEN sp.master_product_id = 7454739 THEN 7454739 WHEN sp.master_product_id = 2769595 THEN 3675179 WHEN sp.master_product_id = 123105 THEN 3675179 WHEN sp.master_product_id = 7461021 THEN 7461021 WHEN sp.master_product_id = 165505 THEN 7461021 WHEN sp.master_product_id = 368474 THEN 3675179 WHEN sp.master_product_id = 374223 THEN 3675179 WHEN sp.master_product_id = 199262 THEN 3713449 WHEN sp.master_product_id = 7529293 THEN 7529293 WHEN sp.master_product_id = 154873 THEN 3675179 WHEN sp.master_product_id = 2317173 THEN 8897354 WHEN sp.master_product_id = 112362 THEN 7529293 WHEN sp.master_product_id = 127029 THEN 3675179 WHEN sp.master_product_id = 2629564 THEN 3675179 WHEN sp.master_product_id = 130085 THEN 3675179 WHEN sp.master_product_id = 95617 THEN 3713449 WHEN sp.master_product_id = 3675179 THEN 3675179 WHEN sp.master_product_id = 1462716 THEN 3170808 WHEN sp.master_product_id = 3261507 THEN 3675179 WHEN sp.master_product_id = 2950238 THEN 3675179 WHEN sp.master_product_id = 2742300 THEN 3675179 WHEN sp.master_product_id = 101044 THEN 3675179 WHEN sp.master_product_id = 1458061 THEN 4039359 WHEN sp.master_product_id = 3170808 THEN 3170808 WHEN sp.master_product_id = 3015043 THEN 3675179 WHEN sp.master_product_id = 750862 THEN 3067885 WHEN sp.master_product_id = 8897354 THEN 8897354 WHEN sp.master_product_id = 101043 THEN 3675179 WHEN sp.master_product_id = 7477797 THEN 7477797 WHEN sp.master_product_id = 97463 THEN 3675179 WHEN sp.master_product_id = 1907886 THEN 3675179 WHEN sp.master_product_id = 1909941 THEN 4039359 WHEN sp.master_product_id = 133465 THEN 3713449 WHEN sp.master_product_id = 123050 THEN 3170808 WHEN sp.master_product_id = 3041110 THEN 3170808 WHEN sp.master_product_id = 406907 THEN 3713449 WHEN sp.master_product_id = 322317 THEN 3675179 WHEN sp.master_product_id = 150733 THEN 3067885 WHEN sp.master_product_id = 2901961 THEN 3675179 WHEN sp.master_product_id = 3549846 THEN 3675179 WHEN sp.master_product_id = 160427 THEN 3170808 WHEN sp.master_product_id = 1930007 THEN 4039359 WHEN sp.master_product_id = 96458 THEN 7454739 WHEN sp.master_product_id = 205836 THEN 4039359 WHEN sp.master_product_id = 134045 THEN 7477797 WHEN sp.master_product_id = 109029 THEN 3067885 WHEN sp.master_product_id = 94867 THEN 3675179 WHEN sp.master_product_id = 112818 THEN 4039359 WHEN sp.master_product_id = 102244 THEN 3675179 WHEN sp.master_product_id = 109100 THEN 3713449 WHEN sp.master_product_id = 94974 THEN 3675179 WHEN sp.master_product_id = 133472 THEN 7454739 WHEN sp.master_product_id = 102185 THEN 3675179 WHEN sp.master_product_id = 2712622 THEN 7454739 WHEN sp.master_product_id = 101339 THEN 3675179 WHEN sp.master_product_id = 170223 THEN 3713449 WHEN sp.master_product_id = 2812826 THEN 3170808 WHEN sp.master_product_id = 122806 THEN 3675179 WHEN sp.master_product_id = 4039359 THEN 4039359 WHEN sp.master_product_id = 122841 THEN 3675179 WHEN sp.master_product_id = 190887 THEN 3067885 WHEN sp.master_product_id = 127440 THEN 4039359 WHEN sp.master_product_id = 124804 THEN 3675179 WHEN sp.master_product_id = 95010 THEN 3675179 WHEN sp.master_product_id = 129463 THEN 4039359 WHEN sp.master_product_id = 101042 THEN 3675179 WHEN sp.master_product_id = 2639215 THEN 3675179 ELSE sp.master_product_id END limit 500
Bindings:
[8897354,7529293,7493489,7477797,7461021,7455068,7454739,7452710,7446739,7443230,7441884,7439517,7431628,6744655,6709207,6708345,4983751,4039359,3995178,3929128,3915123,3864304,3745830,3713449,3700683,3700048,3677696,3676089,3675179,3385632,3170808,3067885,809367,420472,98565,864799,764101,1909820,95379,1454922,337070,2927777,1945358,2769595,123105,165505,368474,374223,199262,154873,2317173,112362,127029,2629564,130085,95617,1462716,3261507,2950238,2742300,101044,1458061,3015043,750862,101043,97463,1907886,1909941,133465,123050,3041110,406907,322317,150733,2901961,3549846,160427,1930007,96458,205836,134045,109029,94867,112818,102244,109100,94974,133472,102185,2712622,101339,170223,2812826,122806,122841,190887,127440,124804,95010,129463,101042,2639215,0,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363]
#9
⏱️ 12.41 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[819027,819449,820064,6331580,6332670,6334052,860590,861382,862485,6128149,6128549,6132177,6146291,30237836,2524781,30233665,12064576,30233504,33788672,30232583,2525627,2524669,30229741,30233505,2527004,30232582,30240292,30227561,30229742,30237832,30238989,2526880,2523513,12066010,12069538,2525219,2526841,2524676,2525189,30232585,2524787,78533712,78533715,1791884,29177661,1801893,1794846,1799734,10308216,1793393,1801900,10309891,10304458,26500787,1804591,522038,522662,523473]
#10
⏱️ 10.41 мс
select * from "stores" where "stores"."id" in (21, 123, 148, 363, 481, 755, 767)
#11
⏱️ 36.19 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["eilat"]
#12
⏱️ 17.55 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 16.09 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]