Re: Check memory consumption of postgresql query

From: Clinton Adams <clinton(dot)adams(at)gmail(dot)com>
To: Phan Công Minh <cphan(at)hsr(dot)ch>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Check memory consumption of postgresql query
Date: 2014-05-08 14:04:01
Message-ID: CAEuopLbNRe0qe8-7kC-6OmH7Jx_q0hWXwmeo83TCTsgve0rOGA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, May 8, 2014 at 3:04 AM, Phan Công Minh <cphan(at)hsr(dot)ch> wrote:
> Hello PostgreSQL community ,
>
> I'm doing benchmark between column store and traditional row-oriented store.
> I would like to know if there is any way to measure memory consummed by a
> query execution?

In linux you can look at the memory usage for a particular backend in
/proc/[pid]/smaps. Get the pid with pg_backend_pid() or from
pg_stat_activity.

For more info, check out
http://www.depesz.com/2012/06/09/how-much-ram-is-postgresql-using/

- Clinton

>
> Thanks
> Minh,
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tomas Vondra 2014-05-08 22:59:37 Re: Postgresql 9.3 for a Mobile Backend
Previous Message Dorian Hoxha 2014-05-08 11:44:12 Re: Specifications for a new server