Report Timing out

I have a BAQ report that keeps timing out. In the BAQ it returns 589 rows in 2672.6982 ms. In the report, I have it further restricted to a data range, so it should return less than the entire baq. Ideas on what I can look for to fix the timing out issue?

It could be a parameter sniffing issue. Can you extract the BAQ and upload it here so we can look at it.

ShipAssistance.baq (138.1 KB)

The only parameter/Option I had set on it was in the BAQ Report Designer.

EEEk ok so that query is fairly compliated and I don’t have the UD Fields it requires, but I would try to add

OPTION(OPTIMIZE FOR UNKNOWN)

In your version this can be done via an OrderBy Execution Setting as shown below but that may mess with your actual sort, so handle with care.

2 Likes

I was asked to give this data quickly, so I took an existing BAQ to get it done faster. Well, I think I am going to need to go back and clean it up soon. I will give that a shot and see what happens.

@Will79 I would try adding Company for OrderHed and OrderRel. Company plus Key1-5 for the UD tables unless the other keys change the grouping. Anything that will give SQL at lest a few complete indexes to work with.

I know there is a way to see the actual query the server is getting, but I can’t find that post tonight. Maybe that would give you a clue about how the baq is getting wrapped up at the server.

1 Like

I went back through and added company to the connections between the tables and it worked. I should do it more often, but I always seem to think it doesn’t really matter. Well, in this case…IT MATTERED!!

2 Likes

It ALWAYS matters Company is always part of the Index