#1
⏱️ 170.29 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"netivot"]
#2
⏱️ 1036.84 мс
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:
["grocery","sauces_oils",445,623,true,445,623]
#3
⏱️ 541.54 мс
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:
["grocery","sauces_oils",445,623,true,445,623]
#4
⏱️ 11.81 мс
select * from "canonical_products" where "canonical_products"."id" in (264)
#5
⏱️ 13.47 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[264]
#6
⏱️ 11.67 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[75165094,66413048,4991028,4988808,4988696,4987860,4987789,4987622,4987621,4985212,4984746,4984221,4817921,3931378,3484014,2811192,2807243,2752605,2671353,2669776,2658241,2657764,2632495,2631542,1972068,1458529,1458528,1458526,1456311,1429562,1424653,785096,98914,true,445,623]
#7
⏱️ 14.93 мс
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 = 98914 THEN 1458529 WHEN sp.master_product_id = 1458529 THEN 1458529 ELSE sp.master_product_id END limit 500
Bindings:
[75165094,66413048,4991028,4988808,4988696,4987860,4987789,4987622,4987621,4985212,4984746,4984221,4817921,3931378,3484014,2811192,2807243,2752605,2671353,2669776,2658241,2657764,2632495,2631542,1972068,1458529,1458528,1458526,1456311,1429562,1424653,785096,98914,0,445,623]
#8
⏱️ 38.04 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[2221982,2222341,2215000,2209988,2223753,2219951,2222154,2219610,2211037,2218269,31244828,10937842,31241369,44441714,67863255,3012124,3009171,12361958,12356198,3011795,12359625,3012682,3012763,11751542,12351049,12352074,12353040,12357950,12357951,12358118,12358189,12360525,12360637,12362964,75628030]
#9
⏱️ 6.93 мс
select * from "stores" where "stores"."id" in (445, 623)
#10
⏱️ 7.97 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["netivot"]
#11
⏱️ 10.7 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#12
⏱️ 21.46 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]