8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 10:40:38 +01:00

Fixed the sub-optimal plan reported by Vlad privately

This commit is contained in:
Dmitry Yemanov 2020-03-13 20:38:09 +03:00
parent 24f974da1e
commit bf4e089271

View File

@ -2939,7 +2939,10 @@ void RseNode::pass1Source(thread_db* tdbb, CompilerScratch* csb, RseNode* rse,
// where we are just trying to inner join more than 2 streams. If possible, // where we are just trying to inner join more than 2 streams. If possible,
// try to flatten the tree out before we go any further. // try to flatten the tree out before we go any further.
if (!rse->rse_jointype && !rse_jointype && !rse_sorted && !rse_projection && const auto isLateral = (this->flags & RseNode::FLAG_LATERAL) != 0;
if (!isLateral && !rse->rse_jointype && !rse_jointype &&
!rse_sorted && !rse_projection &&
!rse_first && !rse_skip && !rse_plan) !rse_first && !rse_skip && !rse_plan)
{ {
NestConst<RecordSourceNode>* arg = rse_relations.begin(); NestConst<RecordSourceNode>* arg = rse_relations.begin();