Some of our Epicor users experience extreme slow downs on loading a BAQ through a customization but when using a different user ID on the same computer, its fast!

I guess the title says it all!

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.

Any help is much appreciated.

See if their tracing is on.

This sounds like a parameter sniffing issue.

I thought BAQ sql queries were recompiled each time?

If not, should he try the Option Recompile trick?

Edit: In case @josecgomez doesn’t get back to us, here is a relevant thread where he goes into it:

1 Like

it’s probably not this, but it was for us…

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.

They are not recompiled automatically. Though I did open an idea about that #GoVote

Yes the recompile trick might help if that’s the issue

Go vote for my idea

https://epicor-manufacturing.ideas.aha.io/ideas/KIN-I-3654

1 Like

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.

Wow thanks a lot! It worked! I ran the ‘Update Statistics…’ on the involved tables and boom! Problem solved!