#1
⏱️ 36.66 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"givatayim"]
#2
⏱️ 3634.23 мс
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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)))
Bindings:
["snacks",223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231,true,223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231]
#3
⏱️ 1049.55 мс
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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))) 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:
["snacks",223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231,true,223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231]
#4
⏱️ 15.04 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[74076446,72978997,63265682,32652869,27408007,24848918,12851980,12851979,12851978,12721528,12721432,12359404,8326860,7511974,7502589,7501600,7495464,7486023,7486017,7485999,7485890,7485886,7477938,7473573,7473572,7473383,7472064,7468703,7468425,7468345,7463528,7463453,true,223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231]
#5
⏱️ 9.36 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[74076446,72978997,63265682,32652869,27408007,24848918,12851980,12851979,12851978,12721528,12721432,12359404,8326860,7511974,7502589,7501600,7495464,7486023,7486017,7485999,7485890,7485886,7477938,7473573,7473572,7473383,7472064,7468703,7468425,7468345,7463528,7463453,0,223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231]
#6
⏱️ 1.18 мс
select * from "stores" where "stores"."id" in (431, 454, 458, 492, 493, 567)
#7
⏱️ 1.18 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["givatayim"]
#8
⏱️ 1.66 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#9
⏱️ 1.3 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]