Re: 7.3.1 New install, large queries are slow

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: 7.3.1 New install, large queries are slow
Date: 2003-01-15 20:10:12
Message-ID: 20030115151012.A21930@mail.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)libertyrms(dot)info> M2P 2A8
+1 416 646 3304 x110

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Hannu Krosing 2003-01-15 20:42:59 Re: 7.3.1 New install, large queries are slow
Previous Message Rod Taylor 2003-01-15 19:53:11 Re: 7.3.1 New install, large queries are slow