Am 17.03.2013 09:31, schrieb Scott Marlowe:
> On Thu, Mar 14, 2013 at 12:55 PM, prashantmalik
> <prashantmalikk@gmail.com> wrote:
>>
>> *Query :* "SELECT * FROM customer"
>>
-----------------------------------------------------------------------------------------------------------------------------------------------------------
>> top
>>
>> top - 00:14:38 up 44 days, 12:06, 2 users, load average: 3.57, 1.34, 0.69
>> Tasks: 243 total, 3 running, 240 sleeping, 0 stopped, 0 zombie
>> Cpu(s): 6.5%us, 0.6%sy, 0.0%ni, 92.5%id, 0.4%wa, 0.0%hi, 0.0%si,
>> 0.0%st
>> Mem: 32949816k total, 31333260k used, 1616556k free, 526988k buffers
>> Swap: 4192956k total, 1989136k used, 2203820k free, 9182092k cached
>>
>> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
>> 12671 root 25 0 19.8g 19g 1612 R 100.1 62.6 4:31.78 psql
What eats up your memory is "psql", which indeed allocates a whopping
19G physical memory, not the server process.
- Are you sure that is _your_ "psql" selecting "* from customers" and
not somebody else's, doing a cross-join?
- Is there potentially anything that gets TOASTed in your "customer"
table? I'm not sure if that would show up in pg_relation_size and
friends, but it would get sent to psql of course.
Regards,
--
Gunnar "Nick" Bluth
RHCE/SCLA
Mobil +49 172 8853339
Email: gunnar.bluth@pro-open.de
__________________________________________________________________________
In 1984 mainstream users were choosing VMS over UNIX. Ten years later
they are choosing Windows over UNIX. What part of that message aren't you
getting? - Tom Payne