BAQ Timing out but in SQL runs in less than 1 second

@Brian_Chandler If you search there are several different threads on queries with customer being slower for a variety of reason as well as the wrapper the Epicor adds for territory security that make the SSMS query very different that what is in the BAQ.

Below is one approach to fix the issue. I think another one is removing company from the query.