Re: 7.3.1 New install, large queries are slow - Mailing list pgsql-performance

From Andrew Sullivan
Subject Re: 7.3.1 New install, large queries are slow
Date
Msg-id 20030115151012.A21930@mail.libertyrms.com
Whole thread Raw
In response to 7.3.1 New install, large queries are slow  ("Roman Fail" <rfail@posportal.com>)
List pgsql-performance
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


pgsql-performance by date:

Previous
From: Rod Taylor
Date:
Subject: Re: 7.3.1 New install, large queries are slow
Next
From: Josh Berkus
Date:
Subject: Re: complicated queries in pl/pgsql