■ 실행 쿼리 조회하기

------------------------------------------------------------------------------------------------------------------------

 

SELECT

    PID

   ,AGE(CLOCK_TIMESTAMP(), QUERY_START)

   ,USENAME

   ,QUERY

FROM  PG_STAT_ACTIVITY

WHERE QUERY != '<IDLE>'

AND   QUERY NOT ILIKE '%PG_STAT_ACTIVITY%'

ORDER BY QUERY_START DESC;

 

------------------------------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요