Alex Johnson <alex@aretesystems.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