Oracle Scripts

SQL sorgusu PGA üzerinde ne kadar bellek tüketir.

Soru : Bir SQL sorgusunun PGA üzerinde harcağı bellek miktarını nasıl öğrenirim ?

  SELECT NVL (a.username, '(oracle)') AS USER,
         a.module                   AS MODULE,
         a.program                  AS PROGRAM,
         a.SID,
         TRUNC (b.VALUE / 1024)     AS memory_kb,
         sql_id,
         LOGON_TIME                 AS SESSION_LOGON,
         PREV_EXEC_START            AS "LAST EXECUTED "
    FROM v$session a, v$sesstat b, v$statname c
   WHERE     a.sid = b.sid
         AND b.statistic# = c.statistic#
         AND c.name = 'session pga memory'
         AND a.program IS NOT NULL
         AND SQL_ID = 'xxxxxxxxxxxx'
ORDER BY b.VALUE DESC;
Tags

Bugra Parlayan

I use this blog in my spare time to jot down thoughts and share my professional experiences. It’s my personal space to unwind and reflect. Feel free to share or reuse anything you find helpful here — just a small thank you is more than enough :) You can reach me at: bugra[@]bugraparlayan.com.tr

Related Articles

Leave a Reply

Back to top button
Close