Re: count with high allocation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: paulo matadr <saddoness(at)yahoo(dot)com(dot)br>
Cc: GENERAL <pgsql-general(at)postgresql(dot)org>
Subject: Re: count with high allocation
Date: 2010-04-07 14:31:27
Message-ID: 14229.1270650687@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

paulo matadr <saddoness(at)yahoo(dot)com(dot)br> writes:
> Monitoring "top" in database server , i could noticed an query with reserved 8GB on physical memory.

> select count(field) from big_table 1 inner join big_table2...

> There is the possibility of using another function with less memory allocation?
> Is there a way to limit the memory usage of the count?

It seems quite likely that what top is telling you just reflects the
process touching all shared buffers, and has nothing to do with any
real "memory consumption". What do you have shared_buffers set to?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ing. Marcos Ortiz Valmaseda 2010-04-07 14:34:24 Re: default grant
Previous Message Scott Marlowe 2010-04-07 14:27:35 Re: count with high allocation