Where does query originate?

In looking at the log file for an app, I see many messages like the following: WARNING - ConnectionBus_Queries: (1/82) Query executed in 12 seconds and 503 milliseconds followed by the details of the SQL Select statement. In order to refactor the app to eliminate these long running queries, I am trying to see where this query comes from in the app (i.e. what page, microflow, etc.) Is there a log setting I can change so that this information is recorded in the logs?  Is there some other way to narrow down the source of long running queries? I would appreciate any and all pointers and suggestions!
1 answers
  • For MF's:
    • If this error occurs many times a day, maybe it is a possibility to change the MicroflowEngine lognode's loglevel to trace for a small amount of time. If the above mentioned log is generated somewhere in between an activity that is being written to the logfile via the MicroflowEngine lognode, you could deduce what activity / MF is causing this. If the ConnectionBus_Queries is logging a long time, there should be some MF activity also taking that amount of time I would assume.
  • For pages;
    • an option is to investigate the network tab of your browser via the development toolkit (F12). If it is caused by some slow page element, you should be able to find in the network tab that some XAS call is taking a long time.