BAQ TestExecutionToken

Hi Guys,
Just trying to optimize some baq’s in custom code and I was comparing my queryexecutiondataset in my c# code to the client trace.
I found by adding TestExecutionToken i got a pretty significant speedup.
Any ideas what TestExecutionToken does?

Thanks
Patrick

Could you provide a bit more context as to what you added and where? Is this a c# customization within an Epicor screen? External?

my code is actually external and it was an External BAQ.
But i don’t think it would matter customization or external really it’s just code.

I need to test it with normal BAQ’s.

Execution token is added to the query in sql as a comment and it does nothing other than give epicor a way to cancel the query

What you probably did was change the query execution plan by changing the query and thus it was faster

I was just looking for some context to understand what exactly you added and where. TestExecutionToken wasn’t ringing any bells.

Hey,
Here is what i added
executionDataSet.ExecutionSetting.AddExecutionSettingRow(“PageNum”, “1”, System.Guid.Empty, “A”);
executionDataSet.ExecutionSetting.AddExecutionSettingRow(“PageSize”, “0”, System.Guid.Empty, “A”);
executionDataSet.ExecutionSetting.AddExecutionSettingRow(“NeedTotal”, “False”, System.Guid.Empty, “A”);
executionDataSet.ExecutionSetting.AddExecutionSettingRow(“TestExecutionToken”, Guid.NewGuid().ToString(), System.Guid.Empty, “A”);

Jose’s answer is likely the explanation to the performance increase. After I saw his answer I understood what you were adding.

I bet if you removed the Token line, your query execution time would be the same as with.