#1
⏱️ 42.34 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"ashkelon"]
#2
⏱️ 325.54 мс
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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)))
Bindings:
["dairy","cheese",737,765,1394,1125,1159,1175,1192,544,1317,168,467,489,1361,37,122,131,169,182,247,303,352,405,true,737,765,1394,1125,1159,1175,1192,544,1317,168,467,489,1361,37,122,131,169,182,247,303,352,405]
#3
⏱️ 212.41 мс
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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))) 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:
["dairy","cheese",737,765,1394,1125,1159,1175,1192,544,1317,168,467,489,1361,37,122,131,169,182,247,303,352,405,true,737,765,1394,1125,1159,1175,1192,544,1317,168,467,489,1361,37,122,131,169,182,247,303,352,405]
#4
⏱️ 9 мс
select * from "canonical_products" where "canonical_products"."id" in (199)
#5
⏱️ 0.85 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[199]
#6
⏱️ 12.18 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[36601256,11135534,8314242,4990037,4279811,4105860,4032127,4019922,4003338,3985099,3974567,2802677,2679096,2668917,2633414,2611955,2611893,2611880,2611879,2611240,2611239,1453876,1431399,1431332,595069,567008,506850,441481,197016,188207,187933,178646,4085256,true,737,765,1394,1125,1159,1175,1192,544,1317,168,467,489,1361,37,122,131,169,182,247,303,352,405]
#7
⏱️ 1.56 мс
select * from "stores" where "stores"."id" in (131, 169, 303, 352, 405)
#8
⏱️ 13.03 мс
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 = 4085256 THEN 4019922 WHEN sp.master_product_id = 4019922 THEN 4019922 ELSE sp.master_product_id END limit 500
Bindings:
[36601256,11135534,8314242,4990037,4279811,4105860,4032127,4019922,4003338,3985099,3974567,2802677,2679096,2668917,2633414,2611955,2611893,2611880,2611879,2611240,2611239,1453876,1431399,1431332,595069,567008,506850,441481,197016,188207,187933,178646,4085256,0,737,765,1394,1125,1159,1175,1192,544,1317,168,467,489,1361,37,122,131,169,182,247,303,352,405]
#9
⏱️ 14.22 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6065861,551664,6531639,36360960,5243870,5241505,5532243,12423301,36361006,33631025,31506063,2463550,11747666,11758248,11758247,11758246,11758240,11758242,11758243,30089008,11758234,11749478,30103425,31719919,56578735,77833952,3355181,3355414,3342938,3810827,3342960,3355519,3355705,3343871,3356051,3808160,26687739,26687738,80252106]
#10
⏱️ 1.24 мс
select * from "stores" where "stores"."id" in (131, 169, 303, 352, 405, 467, 489, 544)
#11
⏱️ 3.18 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["ashkelon"]
#12
⏱️ 5.05 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 3.88 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]