Re: Explicit joins

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <pgsql-performance(at)postgresql(dot)org>, "Rishabh Kumar Jain" <rishabh(dot)widu(at)yahoo(dot)com>
Subject: Re: Explicit joins
Date: 2011-05-05 17:16:20
Message-ID: 4DC29514020000250003D2FB@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Rishabh Kumar Jain <rishabh(dot)widu(at)yahoo(dot)com> wrote:

> I am getting data from 10 tables in a view.
> I don't know on which pair of tables I have to add explicit joins
> to improve performance.

There's usually some fairly natural order in terms of understanding
the request. I find it's often good to try to state in words what
data I want to see (*not* how I think I could get that data, but
describe logically which set of data I want), and list the tables in
the order the appear in that description. The description will
naturally tend to include or imply your join conditions and other
selection criteria.

-Kevin

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Brian Connolly 2011-05-05 17:43:37 Poor query plan chosen in 9.0.3 vs 8.3.7
Previous Message Dave Page 2011-05-05 07:49:47 Re: amazon ec2