Re: Find how much memory is postgres using

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> 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



[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux