Skip to main content
SteelDust
Participating Frequently
May 3, 2010
Answered

Rescue Query name

  • May 3, 2010
  • 1 reply
  • 1433 views

Dear all,

I need to rescue the names of every Query in my page dynamically.

I'd like to use it in every my page to check the Query ExecutionTime.

How can I rescue the query name?

thanks in advance

Best regards

This topic has been closed for replies.
Correct answer Adam Cameron.

Have a look at the debugging template.  It's in theWEB-INF/debug dir.

--

Adam

1 reply

Inspiring
May 3, 2010

Switch debugging on?

--

Adam

SteelDust
SteelDustAuthor
Participating Frequently
May 3, 2010

Yes, but... I'd like to:


1) retrive the name's query;
2) loop the queries;
3) check the ExecutionTime for each query;
4) if ExecutionTime > 3000 send an e-mail to developers

like this:

<cfset qNames = I don't know...>

<cfset qList = "">

<cfloop index="i" list="#qNames#" delimiters=",">

    

     <cfif  evaluate(i & ".getMetaData().getExtendedMetaData().executionTime") GT 3000>

          <cfset ListAppend(qList, i)>

     </cfif>

</cfloop>

<cfif ListLen(qList)>

     ... send an email...

</cfif>

could you help me, please?

thanks in advance

best regards

Adam Cameron.Correct answer
Inspiring
May 3, 2010

Have a look at the debugging template.  It's in theWEB-INF/debug dir.

--

Adam