How to tune a SELECT in 7.0.2

From: "Kevin O'Gorman" <kogorman(at)pacbell(dot)net>
To: "pgsql-general(at)hub(dot)org" <pgsql-general(at)hub(dot)org>
Subject: How to tune a SELECT in 7.0.2
Date: 2000-09-18 04:14:23
Message-ID: 39C5969F.3D8C500F@pacbell.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm just starting with PostgreSQL, and doing it in
a (maybe too) big way. I'm aiming to use it for
some database research, so I've got about a GB of
synthetic data from the OLAP benchmark.

To begin with, I have some chores, and they're taking
an unreasonably long time. I need help. I suspect
in the first place that I need to so something to
speed up sorting because I have a CREATE TABLE AS
that has run over a day now with no signs of ending.

The query plan from EXPLAIN is pure SORT and MERGE
JOIN, which is as I suspect it should be. On this
hardware, a UNIX sort of the text file the data
came from (while the CTAS was still going on) took
1.5 hours of user+sys time, and just over 3 hours
elapsed. There are three tables, so there are
three sorts and two merges (no sort on the output of
the first merge). So I would expect maybe 3x5 or 15
hours to be pessimistic, and I'm way beyond that
already.

I've explored the SET command, and see nothing
helpful there. My documentation is a bit out of sync
because I cannot SHOW NAMES (which is on the line
with SHOW CLIENT_ENCODING) and I cannot SHOW
CONSTRAINTS.

If there are command line switches that would help,
I haven't found them. I suspect I need to give
sorting more internal memory inside the backend.
I have 256MB ram, and not much else going on, so I
would gladly give 65MB just to this, I just need to
know how.

I'm very glad to get directions to RTFM, if it comes
with a pointer to which (or which part of the) FM to R.
I've already read all the FMs that came with the
product.

++ kevin

--
Kevin O'Gorman (805) 650-6274 mailto:kogorman(at)pacbell(dot)net
Permanent e-mail forwarder: mailto:Kevin.O'Gorman(dot)64(at)Alum(dot)Dartmouth(dot)org
At school: mailto:kogorman(at)cs(dot)ucsb(dot)edu
Web: http://www.cs.ucsb.edu/~kogorman/index.html
Web: http://trixie.kosman.via.ayuda.com/~kevin/index.html

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Neil Conway 2000-09-18 04:49:16 Re: How to tune a SELECT in 7.0.2
Previous Message luc00 2000-09-18 04:04:41 OFF topic : SQL interface to non-SQL as DBF ?