#1
⏱️ 157.12 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"kiryat-gat"]
#2
⏱️ 1348.85 мс
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",471,90,243,true,471,90,243,"produce"]
#3
⏱️ 423.28 мс
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",471,90,243,true,471,90,243,"produce"]
#4
⏱️ 8.59 мс
select * from "canonical_products" where "canonical_products"."id" in (8, 32, 34, 44, 90, 149, 152, 173, 192, 201, 239, 359)
#5
⏱️ 6.49 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[44,90,239,152,32,149,201,359,173,34,8,192]
#6
⏱️ 11.61 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?)
Bindings:
[7493489,7466366,7431628,7430884,7429691,7428697,6744655,6708345,4039359,3918165,3915123,3887679,3885397,3885380,3885348,3880530,3876067,3875670,3875648,3864304,3844601,3804990,3795026,3734287,3700683,3676089,3643885,3562691,3385632,3225948,3170808,3084365,1462716,123050,3041110,160427,2812826,3301192,195158,113137,97844,150763,199256,109102,133482,1993337,95635,160965,1458061,1909941,1930007,205836,112818,127440,129463,129450,3719257,103034,1946614,133462,160959,109137,2749844,95614,160081,154955,112107,126102,162827,160961,112088,170208,3914999,95809,true,471,90,243]
#7
⏱️ 4.07 мс
select * from "stores" where "stores"."id" in (90)
#8
⏱️ 32.28 мс
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 = 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 = 3301192 THEN 3885348 WHEN sp.master_product_id = 3885348 THEN 3885348 WHEN sp.master_product_id = 195158 THEN 3885348 WHEN sp.master_product_id = 113137 THEN 3885348 WHEN sp.master_product_id = 97844 THEN 3885348 WHEN sp.master_product_id = 150763 THEN 3225948 WHEN sp.master_product_id = 199256 THEN 3225948 WHEN sp.master_product_id = 3225948 THEN 3225948 WHEN sp.master_product_id = 109102 THEN 3225948 WHEN sp.master_product_id = 133482 THEN 3225948 WHEN sp.master_product_id = 1993337 THEN 3225948 WHEN sp.master_product_id = 95635 THEN 3225948 WHEN sp.master_product_id = 7428697 THEN 7428697 WHEN sp.master_product_id = 160965 THEN 7428697 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 = 3876067 THEN 3876067 WHEN sp.master_product_id = 129450 THEN 3876067 WHEN sp.master_product_id = 3719257 THEN 3876067 WHEN sp.master_product_id = 103034 THEN 3885397 WHEN sp.master_product_id = 1946614 THEN 3885397 WHEN sp.master_product_id = 133462 THEN 3885397 WHEN sp.master_product_id = 160959 THEN 3885397 WHEN sp.master_product_id = 109137 THEN 3885397 WHEN sp.master_product_id = 2749844 THEN 3885397 WHEN sp.master_product_id = 95614 THEN 3885397 WHEN sp.master_product_id = 3885397 THEN 3885397 WHEN sp.master_product_id = 160081 THEN 3643885 WHEN sp.master_product_id = 3643885 THEN 3643885 WHEN sp.master_product_id = 154955 THEN 3643885 WHEN sp.master_product_id = 112107 THEN 3643885 WHEN sp.master_product_id = 3084365 THEN 3084365 WHEN sp.master_product_id = 126102 THEN 3084365 WHEN sp.master_product_id = 162827 THEN 3875670 WHEN sp.master_product_id = 3875670 THEN 3875670 WHEN sp.master_product_id = 160961 THEN 3875670 WHEN sp.master_product_id = 112088 THEN 3875670 WHEN sp.master_product_id = 170208 THEN 3875670 WHEN sp.master_product_id = 3914999 THEN 3918165 WHEN sp.master_product_id = 3918165 THEN 3918165 WHEN sp.master_product_id = 3795026 THEN 3795026 WHEN sp.master_product_id = 95809 THEN 3795026 ELSE sp.master_product_id END limit 500
Bindings:
[7493489,7466366,7431628,7430884,7429691,7428697,6744655,6708345,4039359,3918165,3915123,3887679,3885397,3885380,3885348,3880530,3876067,3875670,3875648,3864304,3844601,3804990,3795026,3734287,3700683,3676089,3643885,3562691,3385632,3225948,3170808,3084365,1462716,123050,3041110,160427,2812826,3301192,195158,113137,97844,150763,199256,109102,133482,1993337,95635,160965,1458061,1909941,1930007,205836,112818,127440,129463,129450,3719257,103034,1946614,133462,160959,109137,2749844,95614,160081,154955,112107,126102,162827,160961,112088,170208,3914999,95809,0,471,90,243]
#9
⏱️ 22.07 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4811445,4811428,4823392,11872727,2477932,2481499,31551989,31554735,31554676,11861011,30148410,11876815,11872440,33710101,11850942,31550768,33685601,33685655,2481607,33695992,33707306,33707338,2481480,33712134,2477178,2480831,2481608,11843921,11876976,2477435,2478429,2479622,2480366,30141109,30150404]
#10
⏱️ 1.49 мс
select * from "stores" where "stores"."id" in (90, 471)
#11
⏱️ 2.28 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"kiryat-gat"]
#12
⏱️ 432.55 мс
select store_id, count(*) as total from "deals" where "store_id" in (?, ?, ?) and "is_active" = ? and ("expires_at" is null or "expires_at" >= ?) group by "store_id"
Bindings:
[471,90,243,true,"2026-10-22T19:56:17.685870Z"]
#13
⏱️ 10.41 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["kiryat-gat"]
#14
⏱️ 12.14 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#15
⏱️ 13.87 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]