#1
⏱️ 30.16 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"eilat"]
#2
⏱️ 353.42 мс
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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))) 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","vegetables",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
⏱️ 747.92 мс
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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))) 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","vegetables",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
⏱️ 10.16 мс
select * from "canonical_products" where "canonical_products"."id" in (7, 8, 35, 48, 71, 84, 90, 105, 138, 139, 142, 170, 280)
#5
⏱️ 10.58 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[71,84,139,90,7,8,170,280,142,138,35,48,105]
#6
⏱️ 120.41 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[7477797,7461021,7455068,7454739,7446739,7441884,7431628,6744655,6709207,6708345,4983751,4039359,3995178,3915123,3864304,3745830,3713449,3700683,3677696,3676089,3385632,3170808,3067885,3067102,3052772,2991556,2986223,2975667,2922879,2903796,2896664,2877891,864799,199262,95617,133465,406907,109100,170223,1462716,123050,3041110,160427,2812826,190929,133470,150773,109467,95620,1959667,109696,194993,193908,154945,133500,1909820,2927777,134045,1454922,165505,1458061,1909941,1930007,205836,112818,127440,129463,1456443,97366,246685,95630,109897,100698,111087,164587,107092,190894,97351,1915898,98238,1455029,1986966,1907936,133463,95650,109313,2637094,96458,133472,2712622,158155,115788,750862,150733,109029,190887,1431157,true,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363]
#7
⏱️ 8.92 мс
select * from "stores" where "stores"."id" in (21, 123, 148, 363)
#8
⏱️ 97.49 мс
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 = 864799 THEN 3713449 WHEN sp.master_product_id = 3713449 THEN 3713449 WHEN sp.master_product_id = 199262 THEN 3713449 WHEN sp.master_product_id = 95617 THEN 3713449 WHEN sp.master_product_id = 133465 THEN 3713449 WHEN sp.master_product_id = 406907 THEN 3713449 WHEN sp.master_product_id = 109100 THEN 3713449 WHEN sp.master_product_id = 170223 THEN 3713449 WHEN sp.master_product_id = 1462716 THEN 3170808 WHEN sp.master_product_id = 3170808 THEN 3170808 WHEN sp.master_product_id = 123050 THEN 3170808 WHEN sp.master_product_id = 3041110 THEN 3170808 WHEN sp.master_product_id = 160427 THEN 3170808 WHEN sp.master_product_id = 2812826 THEN 3170808 WHEN sp.master_product_id = 190929 THEN 2922879 WHEN sp.master_product_id = 2922879 THEN 2922879 WHEN sp.master_product_id = 133470 THEN 2922879 WHEN sp.master_product_id = 150773 THEN 2922879 WHEN sp.master_product_id = 109467 THEN 2922879 WHEN sp.master_product_id = 95620 THEN 2922879 WHEN sp.master_product_id = 2903796 THEN 2903796 WHEN sp.master_product_id = 1959667 THEN 2903796 WHEN sp.master_product_id = 109696 THEN 2903796 WHEN sp.master_product_id = 194993 THEN 2903796 WHEN sp.master_product_id = 193908 THEN 2903796 WHEN sp.master_product_id = 154945 THEN 2903796 WHEN sp.master_product_id = 133500 THEN 2903796 WHEN sp.master_product_id = 1909820 THEN 7477797 WHEN sp.master_product_id = 2927777 THEN 7477797 WHEN sp.master_product_id = 7477797 THEN 7477797 WHEN sp.master_product_id = 134045 THEN 7477797 WHEN sp.master_product_id = 1454922 THEN 7461021 WHEN sp.master_product_id = 7461021 THEN 7461021 WHEN sp.master_product_id = 165505 THEN 7461021 WHEN sp.master_product_id = 1458061 THEN 4039359 WHEN sp.master_product_id = 1909941 THEN 4039359 WHEN sp.master_product_id = 1930007 THEN 4039359 WHEN sp.master_product_id = 205836 THEN 4039359 WHEN sp.master_product_id = 112818 THEN 4039359 WHEN sp.master_product_id = 4039359 THEN 4039359 WHEN sp.master_product_id = 127440 THEN 4039359 WHEN sp.master_product_id = 129463 THEN 4039359 WHEN sp.master_product_id = 1456443 THEN 2896664 WHEN sp.master_product_id = 97366 THEN 2896664 WHEN sp.master_product_id = 246685 THEN 2896664 WHEN sp.master_product_id = 95630 THEN 2896664 WHEN sp.master_product_id = 109897 THEN 2896664 WHEN sp.master_product_id = 100698 THEN 2896664 WHEN sp.master_product_id = 2896664 THEN 2896664 WHEN sp.master_product_id = 111087 THEN 2896664 WHEN sp.master_product_id = 164587 THEN 2896664 WHEN sp.master_product_id = 107092 THEN 2986223 WHEN sp.master_product_id = 190894 THEN 2986223 WHEN sp.master_product_id = 97351 THEN 2986223 WHEN sp.master_product_id = 2986223 THEN 2986223 WHEN sp.master_product_id = 1915898 THEN 2986223 WHEN sp.master_product_id = 98238 THEN 2986223 WHEN sp.master_product_id = 1455029 THEN 2986223 WHEN sp.master_product_id = 1986966 THEN 2986223 WHEN sp.master_product_id = 1907936 THEN 2986223 WHEN sp.master_product_id = 133463 THEN 2986223 WHEN sp.master_product_id = 95650 THEN 2986223 WHEN sp.master_product_id = 109313 THEN 2986223 WHEN sp.master_product_id = 2637094 THEN 2986223 WHEN sp.master_product_id = 7454739 THEN 7454739 WHEN sp.master_product_id = 96458 THEN 7454739 WHEN sp.master_product_id = 133472 THEN 7454739 WHEN sp.master_product_id = 2712622 THEN 7454739 WHEN sp.master_product_id = 158155 THEN 2991556 WHEN sp.master_product_id = 115788 THEN 2991556 WHEN sp.master_product_id = 2991556 THEN 2991556 WHEN sp.master_product_id = 3067885 THEN 3067885 WHEN sp.master_product_id = 750862 THEN 3067885 WHEN sp.master_product_id = 150733 THEN 3067885 WHEN sp.master_product_id = 109029 THEN 3067885 WHEN sp.master_product_id = 190887 THEN 3067885 WHEN sp.master_product_id = 3052772 THEN 3052772 WHEN sp.master_product_id = 1431157 THEN 3052772 ELSE sp.master_product_id END limit 500
Bindings:
[7477797,7461021,7455068,7454739,7446739,7441884,7431628,6744655,6709207,6708345,4983751,4039359,3995178,3915123,3864304,3745830,3713449,3700683,3677696,3676089,3385632,3170808,3067885,3067102,3052772,2991556,2986223,2975667,2922879,2903796,2896664,2877891,864799,199262,95617,133465,406907,109100,170223,1462716,123050,3041110,160427,2812826,190929,133470,150773,109467,95620,1959667,109696,194993,193908,154945,133500,1909820,2927777,134045,1454922,165505,1458061,1909941,1930007,205836,112818,127440,129463,1456443,97366,246685,95630,109897,100698,111087,164587,107092,190894,97351,1915898,98238,1455029,1986966,1907936,133463,95650,109313,2637094,96458,133472,2712622,158155,115788,750862,150733,109029,190887,1431157,0,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363]
#9
⏱️ 13.06 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[819459,819452,819478,819449,820064,6332683,6332673,6332706,6332670,6334052,861395,861385,861426,861382,862485,6128558,6128551,6128576,6128549,6132177,2525185,2524698,2524674,2523211,2524667,30229724,30237836,2524781,30233665,30233504,33788672,2525627,2524669,30229741,30233505,2527004,30240292,30227561,30229742,30237832,30238989,2526880,12066010,2525219,2524676,2525189,30232585,2524787,1805184,1803864,1801990,1801898,1801891,10304470,67458318,1791884,1801893,1794846,1799734,10308216,1793393,1801900,10309891,10304458,522675,522665,522695,522662,523473]
#10
⏱️ 7.87 мс
select * from "stores" where "stores"."id" in (21, 123, 148, 363, 481, 755, 767)
#11
⏱️ 8.5 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["eilat"]
#12
⏱️ 11.76 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 8.16 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]