Re: Find how much memory is postgres using

From: Nik Tek <niktek2005(at)gmail(dot)com>
To: Hubert Lubaczewski <depesz(at)depesz(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Find how much memory is postgres using
Date: 2013-04-09 18:42:19
Message-ID: CAHySzWVxwcnfq2vuxbr9S4cmmfbojSOfQQ3y-pTWW=Mf2K3MkQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin 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(at)depesz(dot)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
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Vedran Krivokuca 2013-04-10 07:07:10 Experience with large number of tables in single PostgreSQL instance
Previous Message hubert depesz lubaczewski 2013-04-09 18:34:07 Re: Find how much memory is postgres using

Browse pgsql-performance by date

  From Date Subject
Next Message Steve Singer 2013-04-10 13:49:55 slow bitmap heap scans on pg 9.2
Previous Message hubert depesz lubaczewski 2013-04-09 18:34:07 Re: Find how much memory is postgres using