#2
⏱️ 5105.48 мс
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:
[186,743,119,1241,545,1325,98,450,684,29,398,true,186,743,119,1241,545,1325,98,450,684,29,398]
#3
⏱️ 2263.48 мс
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:
[186,743,119,1241,545,1325,98,450,684,29,398,true,186,743,119,1241,545,1325,98,450,684,29,398]
#4
⏱️ 111.02 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[136314781,126732851,125153367,125153126,125153123,124010385,123699206,123699205,123598337,119993800,118005752,117894862,117041541,117041538,113787716,112375610,111402467,108808721,108787969,91874114,88742449,82942479,81178120,81158000,81154376,78531197,76754704,76562686,76339981,75165094,74076446,73864860,72978997,70704639,68090455,66413048,63805154,63265682,56283367,56112702,56109693,56108688,56108187,56108186,55055286,54431099,54411455,54393762,54327960,54326693,42625503,42575457,42476629,42476627,42476625,39028558,38847180,38810854,38673323,37085091,36637161,36637160,36601256,36527595,34793660,34414162,34206024,34206023,34205246,34105135,32335444,32080559,31021428,30721319,30721315,30691571,30588986,30060444,28401773,27883716,27628022,27408007,25603232,25491028,25216901,24848918,24332368,12854974,12854973,12854972,12852012,12851980,12851979,12851978,12721529,12721528,true,186,743,119,1241,545,1325,98,450,684,29,398]
#6
⏱️ 12.43 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[136314781,126732851,125153367,125153126,125153123,124010385,123699206,123699205,123598337,119993800,118005752,117894862,117041541,117041538,113787716,112375610,111402467,108808721,108787969,91874114,88742449,82942479,81178120,81158000,81154376,78531197,76754704,76562686,76339981,75165094,74076446,73864860,72978997,70704639,68090455,66413048,63805154,63265682,56283367,56112702,56109693,56108688,56108187,56108186,55055286,54431099,54411455,54393762,54327960,54326693,42625503,42575457,42476629,42476627,42476625,39028558,38847180,38810854,38673323,37085091,36637161,36637160,36601256,36527595,34793660,34414162,34206024,34206023,34205246,34105135,32335444,32080559,31021428,30721319,30721315,30691571,30588986,30060444,28401773,27883716,27628022,27408007,25603232,25491028,25216901,24848918,24332368,12854974,12854973,12854972,12852012,12851980,12851979,12851978,12721529,12721528,0,186,743,119,1241,545,1325,98,450,684,29,398]