From: | "Gaetano Mendola" <mendola(at)bigfoot(dot)com> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Query optimization path |
Date: | 2003-01-12 17:07:14 |
Message-ID: | avs7bu$1690$1@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
"Bruno Wolff III" <bruno(at)wolff(dot)to> wrote in message
news:20030112170108(dot)GB31080(at)wolff(dot)to(dot)(dot)(dot)
> Gaetano Mendola <mendola(at)bigfoot(dot)com> wrote:
> > Hi all,
> >
> > I have the following query:
> >
> > SELECT count(1)
> > FROM providers p JOIN class_default cd USING (id_provider)
> > JOIN user_data ud USING (id_class)
> > JOIN v_user_traffic ut USING (id_user)
> > WHERE id_user_status in (4,5) AND
> > p.company = 'XXXXX';
> >
> > is not slow but I notice that if I do explain analyze with the table
> > reordered
> > inside the select in another way the cost change.
> Using "JOIN" fixes the order that tables are joined in. If you are
> just doing inner joins, then you probably don't want to use the "JOIN"
> keyword. The exception being when there are so many tables being joined
> that you want to manually specify at least some of the join ordering in
> order to help out the planner.
And where is written this behavior ? Is it SQL standard ?
Ciao
Gaetano.
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2003-01-12 17:28:37 | Re: Query optimization path |
Previous Message | Bruno Wolff III | 2003-01-12 17:01:08 | Re: Query optimization path |