[ https://issues.apache.org/jira/browse/TRAFODION-1454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14700244#comment-14700244 ]
ASF GitHub Bot commented on TRAFODION-1454: ------------------------------------------- Github user sureshsubbiah commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/59#discussion_r37237696 --- Diff: core/sql/executor/ExStats.cpp --- @@ -10666,6 +10688,27 @@ NABoolean ExMasterStats::filterForCpuStats(short subReqType, } } else + if (subReqType == SQLCLI_STATS_REQ_ACTIVE_QUERIES) + { + if (stmtState_ != Statement::PROCESS_ENDED_) + { + if (exeStartTime_ != -1) { + if (exeEndTime_ != -1) + tsToCompare = exeEndTime_; + else + tsToCompare = exeStartTime_; + lastActivity_ = (Int32)((currTimestamp-tsToCompare) / (Int64)1000000); + if (exeEndTime_ == -1) + return TRUE; + else + if (lastActivity_ <= etTimeInSecs) { --- End diff -- So active queries with a default of 30 means all currently active queries (regardless of how long they have been active for) + queries that completed in last 30 seconds. Please ignore my previous comment. > Unable to detect the query id via RMS while running the tools like ODB > ---------------------------------------------------------------------- > > Key: TRAFODION-1454 > URL: https://issues.apache.org/jira/browse/TRAFODION-1454 > Project: Apache Trafodion > Issue Type: Improvement > Components: sql-exe > Affects Versions: 0.6 (pre-incubation) > Reporter: Selvaganesan Govindarajan > Priority: Minor > Fix For: 2.0-incubating > > > Currently, the RMS offender is unable to find the query id while using tools > like ODB. These query executions are short but executed many times and the > offender is unable to detect them. Enhance offender to detect this kind of > queries. -- This message was sent by Atlassian JIRA (v6.3.4#6332)