#1
⏱️ 141.47 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"kfar-saba"]
#2
⏱️ 1067.47 мс
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",740,222,392,295,1124,1138,1226,1238,584,317,354,368,25,50,141,194,254,249,302,329,478,498,556,true,740,222,392,295,1124,1138,1226,1238,584,317,354,368,25,50,141,194,254,249,302,329,478,498,556,"produce"]
#3
⏱️ 720.51 мс
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",740,222,392,295,1124,1138,1226,1238,584,317,354,368,25,50,141,194,254,249,302,329,478,498,556,true,740,222,392,295,1124,1138,1226,1238,584,317,354,368,25,50,141,194,254,249,302,329,478,498,556,"produce"]
#4
⏱️ 9.44 мс
select * from "canonical_products" where "canonical_products"."id" in (3, 16, 31, 37, 199, 241)
#5
⏱️ 11.33 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?, ?, ?, ?)
Bindings:
[3,37,31,16,241,199]
#6
⏱️ 375.13 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8775869,8775782,8775713,8775651,8775580,8775546,8775533,8775532,8775528,8775519,8775509,7466366,7463215,7455068,7446739,7443254,7439517,7431628,6908951,5130723,5130389,5127697,4988681,4987518,4097824,4094723,4093867,4089804,4089803,4089325,4085256,4077655,8775857,8775862,8775826,8775829,8775830,8775837,8775838,8775841,8775842,8775845,8775843,8775844,8775847,8775846,8775848,8775850,8775851,8775859,8775861,8775867,8775868,2645047,7696015,8775839,8775856,8775858,8775860,8775863,8775864,199939,4869230,4619338,8775832,8775833,8775836,8775865,8775825,8775828,4533490,189745,8775840,8775849,8775853,8775855,8775866,2642425,2671007,8775827,8775831,8775834,8775835,8775852,8775854,190787,7471561,8775708,8775709,8775712,8775707,8775710,8775711,2609947,115658,111499,114703,115686,8775781,4019922,1907930,150734,133480,true,740,222,392,295,1124,1138,1226,1238,584,317,354,368,25,50,141,194,254,249,302,329,478,498,556]
#7
⏱️ 9.03 мс
select * from "stores" where "stores"."id" in (740)
#8
⏱️ 528.58 мс
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 = 8775857 THEN 8775869 WHEN sp.master_product_id = 8775862 THEN 8775869 WHEN sp.master_product_id = 8775826 THEN 8775869 WHEN sp.master_product_id = 8775829 THEN 8775869 WHEN sp.master_product_id = 8775830 THEN 8775869 WHEN sp.master_product_id = 8775837 THEN 8775869 WHEN sp.master_product_id = 8775838 THEN 8775869 WHEN sp.master_product_id = 8775841 THEN 8775869 WHEN sp.master_product_id = 8775842 THEN 8775869 WHEN sp.master_product_id = 8775845 THEN 8775869 WHEN sp.master_product_id = 8775843 THEN 8775869 WHEN sp.master_product_id = 8775844 THEN 8775869 WHEN sp.master_product_id = 8775847 THEN 8775869 WHEN sp.master_product_id = 8775846 THEN 8775869 WHEN sp.master_product_id = 8775848 THEN 8775869 WHEN sp.master_product_id = 8775850 THEN 8775869 WHEN sp.master_product_id = 8775851 THEN 8775869 WHEN sp.master_product_id = 8775859 THEN 8775869 WHEN sp.master_product_id = 8775861 THEN 8775869 WHEN sp.master_product_id = 8775867 THEN 8775869 WHEN sp.master_product_id = 8775868 THEN 8775869 WHEN sp.master_product_id = 2645047 THEN 8775869 WHEN sp.master_product_id = 7696015 THEN 8775869 WHEN sp.master_product_id = 8775839 THEN 8775869 WHEN sp.master_product_id = 8775856 THEN 8775869 WHEN sp.master_product_id = 8775858 THEN 8775869 WHEN sp.master_product_id = 8775860 THEN 8775869 WHEN sp.master_product_id = 8775863 THEN 8775869 WHEN sp.master_product_id = 8775864 THEN 8775869 WHEN sp.master_product_id = 199939 THEN 8775869 WHEN sp.master_product_id = 4869230 THEN 8775869 WHEN sp.master_product_id = 4619338 THEN 8775869 WHEN sp.master_product_id = 8775832 THEN 8775869 WHEN sp.master_product_id = 8775833 THEN 8775869 WHEN sp.master_product_id = 8775836 THEN 8775869 WHEN sp.master_product_id = 8775865 THEN 8775869 WHEN sp.master_product_id = 8775825 THEN 8775869 WHEN sp.master_product_id = 8775828 THEN 8775869 WHEN sp.master_product_id = 4533490 THEN 8775869 WHEN sp.master_product_id = 189745 THEN 8775869 WHEN sp.master_product_id = 8775840 THEN 8775869 WHEN sp.master_product_id = 8775849 THEN 8775869 WHEN sp.master_product_id = 8775853 THEN 8775869 WHEN sp.master_product_id = 8775855 THEN 8775869 WHEN sp.master_product_id = 8775866 THEN 8775869 WHEN sp.master_product_id = 2642425 THEN 8775869 WHEN sp.master_product_id = 2671007 THEN 8775869 WHEN sp.master_product_id = 8775827 THEN 8775869 WHEN sp.master_product_id = 8775831 THEN 8775869 WHEN sp.master_product_id = 8775834 THEN 8775869 WHEN sp.master_product_id = 8775835 THEN 8775869 WHEN sp.master_product_id = 8775852 THEN 8775869 WHEN sp.master_product_id = 8775854 THEN 8775869 WHEN sp.master_product_id = 8775869 THEN 8775869 WHEN sp.master_product_id = 190787 THEN 8775869 WHEN sp.master_product_id = 8775528 THEN 8775528 WHEN sp.master_product_id = 7471561 THEN 8775528 WHEN sp.master_product_id = 8775708 THEN 8775713 WHEN sp.master_product_id = 8775709 THEN 8775713 WHEN sp.master_product_id = 8775712 THEN 8775713 WHEN sp.master_product_id = 8775707 THEN 8775713 WHEN sp.master_product_id = 8775710 THEN 8775713 WHEN sp.master_product_id = 8775711 THEN 8775713 WHEN sp.master_product_id = 2609947 THEN 8775713 WHEN sp.master_product_id = 115658 THEN 8775713 WHEN sp.master_product_id = 8775713 THEN 8775713 WHEN sp.master_product_id = 111499 THEN 8775713 WHEN sp.master_product_id = 114703 THEN 8775713 WHEN sp.master_product_id = 115686 THEN 8775713 WHEN sp.master_product_id = 8775781 THEN 8775782 WHEN sp.master_product_id = 8775782 THEN 8775782 WHEN sp.master_product_id = 4085256 THEN 4085256 WHEN sp.master_product_id = 4019922 THEN 4085256 WHEN sp.master_product_id = 5130723 THEN 5130723 WHEN sp.master_product_id = 1907930 THEN 5130723 WHEN sp.master_product_id = 150734 THEN 5130723 WHEN sp.master_product_id = 133480 THEN 5130723 ELSE sp.master_product_id END limit 500
Bindings:
[8775869,8775782,8775713,8775651,8775580,8775546,8775533,8775532,8775528,8775519,8775509,7466366,7463215,7455068,7446739,7443254,7439517,7431628,6908951,5130723,5130389,5127697,4988681,4987518,4097824,4094723,4093867,4089804,4089803,4089325,4085256,4077655,8775857,8775862,8775826,8775829,8775830,8775837,8775838,8775841,8775842,8775845,8775843,8775844,8775847,8775846,8775848,8775850,8775851,8775859,8775861,8775867,8775868,2645047,7696015,8775839,8775856,8775858,8775860,8775863,8775864,199939,4869230,4619338,8775832,8775833,8775836,8775865,8775825,8775828,4533490,189745,8775840,8775849,8775853,8775855,8775866,2642425,2671007,8775827,8775831,8775834,8775835,8775852,8775854,190787,7471561,8775708,8775709,8775712,8775707,8775710,8775711,2609947,115658,111499,114703,115686,8775781,4019922,1907930,150734,133480,0,740,222,392,295,1124,1138,1226,1238,584,317,354,368,25,50,141,194,254,249,302,329,478,498,556]
#9
⏱️ 22.87 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[2514726,2516823,2516818,2516454,2515185,2515104,2580925,2583757,2581404,2583128,3572993,3572364,3428957,3427972,3413151,3413627,3413628,3417680,3418534,3421618,4030859,4024624,4024839,4024925,4066678,4028666]
#10
⏱️ 3.4 мс
select * from "stores" where "stores"."id" in (478, 498, 556, 584, 740)
#11
⏱️ 6.39 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"kfar-saba"]
#12
⏱️ 72.7 мс
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:
[740,222,295,1124,1138,1226,1238,584,25,50,141,194,254,249,302,329,478,498,556,true,"2026-09-08T07:07:01.042981Z"]
#13
⏱️ 8.46 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["kfar-saba"]
#14
⏱️ 10.26 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#15
⏱️ 13.75 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]