web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Simple AX / check query cue time

check query cue time

Daniele Ferraretto Profile Picture Daniele Ferraretto

Below a short piece of code for checking duration of queries in cue (AX 2009)

static void RefreshCueCache(Companyid _curr = curext())
{
cueRun cueRun;
cuesQuery cueQuery;
int start, stop, interval, recNo ;
;

changecompany(_curr)
{
    cueQuery = null;

    cuerun = Cuerun::construct();

    while select cueQuery
    {

        cueRun.init(cueQuery.CueId);
        start = timenow();

        recNo = cuerun.getCount();

        stop = timenow();

        interval = stop - start;

        info(strfmt("%1 : record reads %2. Time %3. Company %4", cueQuery.CueId , recNo, interval, curext())  );

    }
}

}


This was originally posted here.

Comments

*This post is locked for comments