Subject | Re: [firebird-support] Re: Solution for a redundant join? |
---|---|
Author | Ann Harrison |
Post date | 2012-10-24T22:27:02Z |
On Wed, Oct 24, 2012 at 4:34 PM, Jeff <jeff_j_dunlap@...> wrote:
not matching home teams and away teams? If not, I would use two inner
joins rather than two outer joins. That lets the optimizer do a better job
of planning the execution path.
Good luck,
Ann
[Non-text portions of this message have been removed]
>Just out of curiosity, do you have any schedule records for which there are
> > Use tables aliases to include multiple references to a single table.
> >
> >
> > SELECT
> > SCHEDULE.DATE_TIME, HomeTeam.TEAM, AwayTeam.Team
> > FROM SCHEDULE
> > LEFT JOIN TEAMS HomeTeam ON HomeTeam.PRIMARYKEY = SCHEDULE.HOME_TEAMID
> > LEFT JOIN TEAMS AwayTeam ON AwayTeam.PRIMARYKEY = SCHEDULE.AWAY_TEAMID
>
> Sean, aliases did the trick, thank you kindly!
>
>
not matching home teams and away teams? If not, I would use two inner
joins rather than two outer joins. That lets the optimizer do a better job
of planning the execution path.
Good luck,
Ann
[Non-text portions of this message have been removed]