Sales Order Entry very slow load

SOLVED

We have an issue where SO Entry is extremely slow to load. I ran a trace using SQL profiler and it appears to occur when a query is made to obtain a list of comm plans (SELECT CommPlanID, CommPlanKey FROM tarCommPlan WHERE CompanyID = X and CompanyID = X). It takes the client a minute and a half to complete this task and this is the only place I see the client stalling. In profiler the trace sits there for 1min 30secs then zooms through to completion.

I tried running the query directly in SQL it is lightning fast.

We have a highly optimized SQL DB and server, so I am left wondering what the issue is. We only have about 8.5k of commission plans, so I don't think that would cause big issues, so maybe this is an issue in the client rather than the server. One thing that strikes me as odd is that the where clause states the CompanyID twice.

I have ruled out customizations by testing on a normal client and on another company. This has been going on for years, so it is not a new occurrence.

Does anyone else have this happen? Once the client is loaded it runs fine. There are no other issues in accessing data as far as I am able to ascertain.