Re: [SQL] tuning large selects

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Werner Reisberger <wreis(at)datacomm(dot)ch>
Cc: pgsql-sql(at)hub(dot)org
Subject: Re: [SQL] tuning large selects
Date: 1999-10-30 04:11:11
Message-ID: 5522.941256671@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Werner Reisberger <wreis(at)datacomm(dot)ch> writes:
> I am running a db (v. 6.4.2) accessible via DBI/Pg from the internet.
> Recently I observed several running postmaster processes consuming
> lots of CPU, resulting in a high load of the machine. There was nobody
> connected to the db from the net. Later I saw that my db partition was
> filled to 100 % by a huge file (pg_psort.189xx). My db partition is
> approx. 950 MB. The db consumes 15 MB and the file consumed the rest.

Yipes. I can't see any obvious reason that a sort temp file would
even be created from the query you describe, much less that it would
grow to many times the size of the original table. What does
"explain" show for the query you were running?

BTW: the existing sort code misbehaves if the disk fills up (it fails
to notice write errors on its temp file). I've fixed this for 7.0,
I believe, but I don't really think that's the immediate cause of
your problem.

regards, tom lane

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Wieck 1999-10-30 15:43:48 Re: [SQL] Decimal precsion?
Previous Message Bruce Momjian 1999-10-30 00:30:48 Re: [SQL] Decimal precsion?