PatL
(PatL)
August 9, 2021, 7:58am
1
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
cfinley
(Chance Finley)
August 17, 2021, 2:00am
2
Could you provide a bit more context as to what you added and where? Is this a c# customization within an Epicor screen? External?
PatL
(PatL)
August 17, 2021, 2:23am
3
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.
josecgomez
(Jose C Gomez)
August 17, 2021, 2:26am
4
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
cfinley
(Chance Finley)
August 17, 2021, 2:49am
5
I was just looking for some context to understand what exactly you added and where. TestExecutionToken wasn’t ringing any bells.
PatL
(PatL)
August 17, 2021, 3:18am
6
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”);
cfinley
(Chance Finley)
August 17, 2021, 3:23am
7
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.