I have to run several queries on SalesOrder and SalesOrderDetail in both current and history tables on a list of job status codes.
Processing the queries takes way too much time.
The status codes I am interested in start with a letter and end in two…