Memory Usage

From: Nathan Barnett <nbarnett(at)centuries(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Memory Usage
Date: 2000-12-08 15:13:54
Message-ID: 5.0.2.1.0.20001208100732.00a5e680@mail.cfl.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am having a small issue with PostgreSQL 7.0.3 on FreeBSD 4.2
Stable. When I perform an update on a table with roughly 2 million rows,
the postgres process starts eating up memory until it eventually uses up
all of the memory and exits without finishing. I have also seen the same
thing happen in complex SELECT statements that I have run. The update
statement is as follows:

UPDATE pages SET createdtime = NOW();

Is there a reason why this would take up all of the memory?? Also the
select statement that caused the issue was a SELECT and GROUP BY that was
in the form of:

SELECT COUNT(*) AS hitcount, date_part('yy', createdtime) AS Year,
date_part('mm', createdtime) AS Month, date_part('dd', createdtime) AS Day
FROM Log group by Year, Month, Day

I found a better way to do this afterwards, but why wouldn't the database
utilize temporary tables to complete this query without using all the RAM?

++++++++++++++++++++++++
+Nathan Barnett
+Sr. Consultant
+Centuries Consulting, Inc.
++++++++++++++++++++++++

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2000-12-08 15:16:30 Re: Indexing for geographic objects?
Previous Message rudy 2000-12-08 14:14:25 CURSOR HELP