#1
⏱️ 113.07 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"eilat"]
#2
⏱️ 548.54 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_slug" = ? and "master_products"."id" in ((select "master_product_id" from "store_prices" where "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)) union (select "master_product_id" from "deals" where "is_active" = ? and "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,148,123,180,237,252,363,481,1379,21,true,1112,755,767,777,1143,1182,1196,1264,148,123,180,237,252,363,481,1379,21,"produce"]
#3
⏱️ 536.15 мс
select * from "master_products" where "barcode" is not null and "category_slug" = ? and "master_products"."id" in ((select "master_product_id" from "store_prices" where "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)) union (select "master_product_id" from "deals" where "is_active" = ? and "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,148,123,180,237,252,363,481,1379,21,true,1112,755,767,777,1143,1182,1196,1264,148,123,180,237,252,363,481,1379,21,"produce"]
#4
⏱️ 8.08 мс
select * from "canonical_products" where "canonical_products"."id" in (7, 8, 25, 35, 71, 105, 143, 182)
#5
⏱️ 9.04 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[71,7,8,35,105,143,25,182]
#6
⏱️ 59.49 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[7477797,7455068,7452710,7446739,7443254,7439517,7431628,6745776,6744655,6730411,6708345,4054217,4012164,3915123,3713449,3700683,3170808,2998448,2975667,2922879,2896664,2877891,2873406,2873402,2842852,2812350,2715904,2702341,2702255,2682071,2681942,2680174,864799,406907,95617,199262,133465,109100,170223,3041110,2812826,1462716,160427,123050,2657391,2657025,2676233,150773,95620,109467,133470,190929,2927777,1909820,134045,1456443,246685,95630,109897,100698,97366,111087,164587,124676,126543,1960939,true,1112,755,767,777,1143,1182,1196,1264,148,123,180,237,252,363,481,1379,21]
#7
⏱️ 10.44 мс
select * from "stores" where "stores"."id" in (21, 123, 148, 363)
#8
⏱️ 53.86 мс
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 = 406907 THEN 3713449 WHEN sp.master_product_id = 95617 THEN 3713449 WHEN sp.master_product_id = 199262 THEN 3713449 WHEN sp.master_product_id = 133465 THEN 3713449 WHEN sp.master_product_id = 109100 THEN 3713449 WHEN sp.master_product_id = 170223 THEN 3713449 WHEN sp.master_product_id = 3041110 THEN 3170808 WHEN sp.master_product_id = 3170808 THEN 3170808 WHEN sp.master_product_id = 2812826 THEN 3170808 WHEN sp.master_product_id = 1462716 THEN 3170808 WHEN sp.master_product_id = 160427 THEN 3170808 WHEN sp.master_product_id = 123050 THEN 3170808 WHEN sp.master_product_id = 2657391 THEN 2702341 WHEN sp.master_product_id = 2657025 THEN 2702341 WHEN sp.master_product_id = 2676233 THEN 2702341 WHEN sp.master_product_id = 2702341 THEN 2702341 WHEN sp.master_product_id = 2922879 THEN 2922879 WHEN sp.master_product_id = 150773 THEN 2922879 WHEN sp.master_product_id = 95620 THEN 2922879 WHEN sp.master_product_id = 109467 THEN 2922879 WHEN sp.master_product_id = 133470 THEN 2922879 WHEN sp.master_product_id = 190929 THEN 2922879 WHEN sp.master_product_id = 2927777 THEN 7477797 WHEN sp.master_product_id = 1909820 THEN 7477797 WHEN sp.master_product_id = 7477797 THEN 7477797 WHEN sp.master_product_id = 134045 THEN 7477797 WHEN sp.master_product_id = 1456443 THEN 2896664 WHEN sp.master_product_id = 246685 THEN 2896664 WHEN sp.master_product_id = 2896664 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 = 97366 THEN 2896664 WHEN sp.master_product_id = 111087 THEN 2896664 WHEN sp.master_product_id = 164587 THEN 2896664 WHEN sp.master_product_id = 2873406 THEN 2873406 WHEN sp.master_product_id = 124676 THEN 2873406 WHEN sp.master_product_id = 126543 THEN 2873406 WHEN sp.master_product_id = 2681942 THEN 2681942 WHEN sp.master_product_id = 1960939 THEN 2681942 ELSE sp.master_product_id END limit 500
Bindings:
[7477797,7455068,7452710,7446739,7443254,7439517,7431628,6745776,6744655,6730411,6708345,4054217,4012164,3915123,3713449,3700683,3170808,2998448,2975667,2922879,2896664,2877891,2873406,2873402,2842852,2812350,2715904,2702341,2702255,2682071,2681942,2680174,864799,406907,95617,199262,133465,109100,170223,3041110,2812826,1462716,160427,123050,2657391,2657025,2676233,150773,95620,109467,133470,190929,2927777,1909820,134045,1456443,246685,95630,109897,100698,97366,111087,164587,124676,126543,1960939,0,1112,755,767,777,1143,1182,1196,1264,148,123,180,237,252,363,481,1379,21]
#9
⏱️ 13.41 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[819459,819452,819449,6332683,6332673,6332670,861395,861385,861382,6128558,6128551,6128549,2524763,2524776,2525185,2524674,2523211,2524780,2524781,2525627,2524669,2527004,2526773,2526857,2526880,2523513,2526556,2525219,2526841,2525189,2524787,1796392,1800791,1793672,1792038,1791867,1791325,1792914,1799920,1793436,1805184,1803864,1801898,1791884,1801893,1799734,1793199,1793393,1794514,522675,522665,522662]
#10
⏱️ 2.07 мс
select * from "stores" where "stores"."id" in (21, 123, 148, 363, 481, 755, 767)
#11
⏱️ 11.72 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["eilat"]
#12
⏱️ 6.89 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 10.64 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]