Re: [PERFORM] Find how much memory is postgres using

2013-04-09 Thread Nik Tek
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 = '

Re: [PERFORM] Find how much memory is postgres using

2013-04-09 Thread hubert depesz lubaczewski
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 -- Sent via pgsql-perf

Re: [PERFORM] Find how much memory is postgres using

2013-04-09 Thread Nik Tek
--For MSSQL select (select cntr_value from sys.dm_os_performance_counters where object_name like '%Memory Manager%' and counter_name like 'Maximum Workspace Memory (KB)%') as Maximum_Workspace_Memory_KB, (select cntr_value from sys.dm_os_performance_counters wher

Re: [PERFORM] Find how much memory is postgres using

2013-04-08 Thread hubert depesz lubaczewski
On Sun, Apr 07, 2013 at 09:27:42PM -0700, Nik Tek wrote: > Thank you Depesz! > But I have a naive question, why isn't a straight forword approach for > postgres, unlike Oracle or MSSQL? No idea. And how do you get memory usage in Oracle or MSSQL? Best regards, depesz -- Sent via pgsql-perfor

Re: [PERFORM] Find how much memory is postgres using

2013-04-07 Thread hubert depesz lubaczewski
On Sat, Apr 06, 2013 at 09:59:16PM -0700, Nik Tek wrote: > Could someone tell m how to measure postgres memory usage. > Is there a pg_* view to measure? http://www.depesz.com/2012/06/09/how-much-ram-is-postgresql-using/ Best regards, depesz -- The best thing about modern society is how easy it

Re: [PERFORM] Find how much memory is postgres using

2013-04-07 Thread Yetkin Öztürk
Hi, as you know 'memory usage' is smt continuously changes in time and not directly related to pg also related to your resources , you can set a specific limit if you want. 2013/4/7 Nik Tek > Hi, > > Could someone tell m how to measure postgres memory usage. > Is there a pg_* view to measure?

[PERFORM] Find how much memory is postgres using

2013-04-06 Thread Nik Tek
Hi, Could someone tell m how to measure postgres memory usage. Is there a pg_* view to measure? Thank you NikT