Re: optimizing queries and indexes... - Mailing list pgsql-sql

From Tom Lane
Subject Re: optimizing queries and indexes...
Date
Msg-id 16540.1000614855@sss.pgh.pa.us
Whole thread Raw
In response to optimizing queries and indexes...  ("Robert J. Sanford, Jr." <rsanford@nolimitsystems.com>)
Responses Re: optimizing queries and indexes...
List pgsql-sql
[ Sorry for slow response, I've been out of town ]

"Robert J. Sanford, Jr." <rsanford@nolimitsystems.com> writes:
> [ some questions already ably answered by Josh and Stephan ]

I just wanted to throw in one more tidbit:

> for example, one thing that one of my friends said is:
>    select X
>    from big_table
>        ,little_table
>    Generally speaking, Oracle optimizes better
>    when the smaller/reducing tables are on the
>    bottom and the larger tables are on the top.
>    I believe SQLServer likes them in the opposite
>    direction.

Postgres absolutely does not care: the optimizer will always consider
both A-join-B and B-join-A orders for every join it has to do.  As
Stephan and Josh noted, you can constrain the join pairs the optimizer
will consider if you use explicit-JOIN syntax --- but each pair will be
considered in both directions.
        regards, tom lane


pgsql-sql by date:

Previous
From: A_Schnabel@t-online.de (Andre Schnabel)
Date:
Subject: Re: To query many tables.
Next
From: Kovacs Baldvin
Date:
Subject: Intentional, or bug?