From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: 7.3.1 New install, large queries are slow
Date: Wed, 15 Jan 2003 15:10:12 -0500
Message-ID: <20030115151012.A21930@mail.libertyrms.com> (raw)
In-Reply-To: <9B1C77393DED0D4B9DAA1AA1742942DA0E4BF9@pos_pdc.posportal.com>
References: <9B1C77393DED0D4B9DAA1AA1742942DA0E4BF9@pos_pdc.posportal.com>
On Wed, Jan 15, 2003 at 10:00:04AM -0800, Roman Fail wrote:
> I have a query that does many joins (including two very big tables)
> which is slow on Postgres. On PGSQL the query takes 19 minutes,
There are three things I can think of right off the bat.
First, the performance of foreign keys is flat-out awful in Postgres.
I suggest avoiding them if you can.
Second, ordering joins explicitly (with the JOIN keyword) constrains
the planner, and may select bad plan. The explain analyse output
was nice, but I didn't see the query, so I can't tell what the plan
maybe ought to be.
Third, I didn't see any suggestion that you'd moved the WAL onto its
own disk. That will mostly help when you are under write load; I
guess it's not a problem here, but it's worth keeping in mind.
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: andrew@libertyrms.info
Subject: Re: 7.3.1 New install, large queries are slow
In-Reply-To: <20030115151012.A21930@mail.libertyrms.com>
References: <9B1C77393DED0D4B9DAA1AA1742942DA0E4BF9@pos_pdc.posportal.com> <20030115151012.A21930@mail.libertyrms.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox