User A logs into computer X
Runs program Y, it takes forever to load a BAQ that would then populate a grid on the cutom program.
User B logs into the same computer
Runs same program, boom. Everything loads fast.
I checked the slow users personalizations and there is none. I disabled the System monitor nnder the slow user and no effect. This happens regardless of user using Epicor or MES calling the same module.
every time user A ran a complex BAQ with CTEs it took forever, and we changed the timeout to over an hour, but when user B ran it, 15 minutes was the time. Still long, but for BOMs up to 6 levels deep being recursively parsed and their results analyzed.
Turns out user A always worked on it at night when SQL backups were running.
We experienced the exact same issue with a couple of BAQs, we traced it to a field (in our case it was Customer.CreditHold) in the BAQ. We never did figure out WHY it was so problematic, we couldn’t find anything in the permissions. We got around it by turning it into an external BAQ, which was identical to the regular BAQ, we didn’t write any SQL code, just copied the logic from the original BAQ. That made it work properly for everyone.