Re: Memory consumption for Query

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "'dhaval jaiswal *EXTERN*'" <dhavallj(at)hotmail(dot)com>, PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Memory consumption for Query
Date: 2017-04-24 07:24:29
Message-ID: A737B7A37273E048B164557ADEF4A58B53A2AEE5@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

dhaval jaiswal wrote:
> How to check how much memory query is consuming.
>
> Is there tool can check of query consuming memory for the execution or output.
>
> Let's say for following query how to calculate memory consumption.
>
> select * from test where id=1;

That query will not consume memory worth mention unless
"test" is a non-trivial view.

You can run "EXPLAIN (ANALYZE) SELECT ..." to see how much memory is used
for memory intense operations like sort, hash or materialize.

Other operations don't really consume much memory.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christofer C. Bell 2017-04-24 09:13:52 Re: Recover PostgreSQL database folder data
Previous Message vinny 2017-04-24 07:04:40 Re: Not sure this should be asked here but...