Re: Slow performance with join on many fields

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alex Johnson <alex(at)aretesystems(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow performance with join on many fields
Date: 2003-03-04 06:27:42
Message-ID: 20975.1046759262@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Alex Johnson <alex(at)aretesystems(dot)com> writes:
> I'm looking at the following query that joins these three
> tables:

> SELECT ...
> FROM
> (tbl_samples
> INNER JOIN tbl_tests USING ...
> )
> INNER JOIN tbl_results USING ...

You're forcing the join order; perhaps another order is preferable? See
http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/explicit-joins.html

> This is the output from EXPLAIN:

EXPLAIN ANALYZE output would've been more useful (it would have shown
whether a different join order would be better, for one thing).

> I've done the following to try to improve performance:
> increased shared_buffers to 384

That's on the picayune side yet. 1000 buffers or so is where you want
to be, I think. Also, have you run ANALYZE or VACUUM ANALYZE lately?

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Alex Johnson 2003-03-04 07:46:38 Re: Slow performance with join on many fields
Previous Message Alex Johnson 2003-03-04 05:48:49 Slow performance with join on many fields