#2
⏱️ 4622.27 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "master_products"."id" in ((select "master_product_id" from "store_prices" where "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)) union (select "master_product_id" from "deals" where "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)))
Bindings:
[1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360,true,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#3
⏱️ 2574.53 мс
select * from "master_products" where "barcode" is not null and "master_products"."id" in ((select "master_product_id" from "store_prices" where "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)) union (select "master_product_id" from "deals" where "is_active" = ? and "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 96 offset 0
Bindings:
[1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360,true,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#4
⏱️ 387.16 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[136314781,127702573,125101687,124010385,119993800,118005752,117894874,117894862,117041541,117041540,117041539,117041538,114466133,112375610,111871546,111402467,111364918,108808721,108787969,91874114,91870308,89617436,85061004,85059377,84869830,81853314,81296640,81029749,79662057,78963913,78963912,78531197,76754704,76339981,75165094,74076446,73966103,73864860,72978997,70704639,66732357,66413048,65764228,63265682,57061517,56283367,56112702,56109693,56108688,56108187,56108186,54411455,42625503,42575457,42476627,42476625,39028558,38847180,37085091,36601256,36527595,34793660,34459085,34414162,34206024,34206023,34205246,34105135,30721319,30721315,30691571,30588986,30247410,30060444,28401773,27883716,27628022,27408007,25912188,25603232,25491028,25216901,24848918,24332368,14970397,13907417,13907412,13907407,13094227,13094225,13083232,13020236,12854973,12852012,12851980,12851979,true,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#6
⏱️ 71.17 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[136314781,127702573,125101687,124010385,119993800,118005752,117894874,117894862,117041541,117041540,117041539,117041538,114466133,112375610,111871546,111402467,111364918,108808721,108787969,91874114,91870308,89617436,85061004,85059377,84869830,81853314,81296640,81029749,79662057,78963913,78963912,78531197,76754704,76339981,75165094,74076446,73966103,73864860,72978997,70704639,66732357,66413048,65764228,63265682,57061517,56283367,56112702,56109693,56108688,56108187,56108186,54411455,42625503,42575457,42476627,42476625,39028558,38847180,37085091,36601256,36527595,34793660,34459085,34414162,34206024,34206023,34205246,34105135,30721319,30721315,30691571,30588986,30247410,30060444,28401773,27883716,27628022,27408007,25912188,25603232,25491028,25216901,24848918,24332368,14970397,13907417,13907412,13907407,13094227,13094225,13083232,13020236,12854973,12852012,12851980,12851979,0,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#9
⏱️ 139.15 мс
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:
[1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,360,true,"2026-11-06T15:28:43.345514Z"]