Subject | RE: [firebird-support] Left join plans |
---|---|
Author | Rick Debay |
Post date | 2008-06-13T13:40:45Z |
Thanks for the quick reply. I'll continue to write my queries in this
mixed fashion (as long as there is no system-wide impact) assuming it
will be fixed.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Dmitry Yemanov
Sent: Thursday, June 12, 2008 2:23 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Left join plans
Rick Debay wrote:
two inner join sets separated by a left join, you shouldn't expect the
query (actually, its right part) to be optimized really well. Once
you've explicitly made the problematic streams linked via left joins,
the problem disappears.
Dmitry
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item on the
main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
Disclaimer: This message (including attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. RxStrategies, Inc. shall not be liable for the improper or incomplete transmission of the information contained in this communication or for any delay in its receipt or damage to your system. RxStrategies, Inc. does not guarantee that the integrity of this communication has been maintained nor that this communication is free from viruses, interceptions or interference.
mixed fashion (as long as there is no system-wide impact) assuming it
will be fixed.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Dmitry Yemanov
Sent: Thursday, June 12, 2008 2:23 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Left join plans
Rick Debay wrote:
> I would expect the first query to be the best, as within thejoin.
> parenthesis I explicitly state that the three tables can use an inner
> Instead, the looser second query where all items use a left joinIt's a known issue with the mixed inner/left join handling. If you have
> performs much better, and the plan reflects this by only having one
> NATURAL scan. The first query has a NATURAL scan for each of the two
> table groupings.
> Does the optimizer know how to handle parenthesized groupings, or is
> it not a special case?
two inner join sets separated by a left join, you shouldn't expect the
query (actually, its right part) to be optimized really well. Once
you've explicitly made the problematic streams linked via left joins,
the problem disappears.
Dmitry
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item on the
main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
Disclaimer: This message (including attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. RxStrategies, Inc. shall not be liable for the improper or incomplete transmission of the information contained in this communication or for any delay in its receipt or damage to your system. RxStrategies, Inc. does not guarantee that the integrity of this communication has been maintained nor that this communication is free from viruses, interceptions or interference.