Skip to content

Commit

Permalink
Resolved CORE-1482: Make optimizer to consider ORDER BY optimization …
Browse files Browse the repository at this point in the history
…when making decision about join order.

Also, improved (hopefully) cost calculation for navigational retrievals.
  • Loading branch information
dyemanov committed Jan 5, 2014
1 parent adef722 commit 15113ae
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 92 deletions.
3 changes: 3 additions & 0 deletions src/dsql/BoolNodes.cpp
Expand Up @@ -1650,6 +1650,9 @@ DmlNode* RseBoolNode::parse(thread_db* tdbb, MemoryPool& pool, CompilerScratch*
RseBoolNode* node = FB_NEW(pool) RseBoolNode(pool, blrOp);
node->rse = PAR_rse(tdbb, csb);

if (blrOp == blr_any || blrOp == blr_exists) // maybe for blr_unique as well?
node->rse->flags |= RseNode::FLAG_OPT_FIRST_ROWS;

if (csb->csb_currentForNode && csb->csb_currentForNode->parBlrBeginCnt <= 1)
node->parentForNode = csb->csb_currentForNode;

Expand Down

0 comments on commit 15113ae

Please sign in to comment.