Re: Find how much memory is postgres using - Mailing list pgsql-performance

From Nik Tek
Subject Re: Find how much memory is postgres using
Date
Msg-id CAHySzWVxwcnfq2vuxbr9S4cmmfbojSOfQQ3y-pTWW=Mf2K3MkQ@mail.gmail.com
Whole thread Raw
In response to Re: Find how much memory is postgres using  (hubert depesz lubaczewski <depesz@depesz.com>)
List pgsql-performance
Hi Depesz,

--Here is better one for Oracle by sga/pga.
SELECT DECODE (GROUPING (nm), 1, 'total', nm) nm,
       ROUND (SUM (val / 1024 / 1024)) MB
  FROM (SELECT 'sga' nm, SUM (VALUE) val FROM v$sga
        UNION ALL
        SELECT 'pga', SUM (VALUE)
          FROM v$sysstat
        WHERE name = 'session pga memory')
GROUP BY ROLLUP (nm);

Sure, I will take up the task, will send you the script once it is ready, so you can bless it. :)

Regards
Nik




On Tue, Apr 9, 2013 at 11:34 AM, hubert depesz lubaczewski <depesz@depesz.com> wrote:
On Tue, Apr 09, 2013 at 11:24:22AM -0700, Nik Tek wrote:
> --For MSSQL
> select
...
> -- Oracle
...

Well, the answer is simple - in Microsoft and Oracle, someone wrote such
views/functions. In Pg - not. You are welcome to provide a patch,
though :)

Best regards,

depesz


pgsql-performance by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Re: Find how much memory is postgres using
Next
From: Steve Singer
Date:
Subject: slow bitmap heap scans on pg 9.2