H.S.Bhathiya(110059X) edited section_Proposed_Solution_We_propose__.tex  about 8 years ago

Commit id: cdb443da58a93ef6ac0fb7fb11ad10bdaec6dce0

deletions | additions      

       

We propose to implement Apache Derby bushy tree base execution plan generation as a collection of deep-left trees. For example a query involving about 10 tables will be considered evaluated by joining 3 or 4 left-deep trees. Connection those tree results in a bushy tree. Main advantage of this approach is that it would benefit from already implemented left deep trees. How ever it may fail guarantee a optimum result and the level optimization would depend on the intermediate left-deep trees built.  Here we have demonstrated our approach using of oracle database. Consider following two queries. queries.\\  Here is normal query which results in left-deep tree on oracle  \begin{verbatim}  SELECT STUDENT.ID as Student_ID, STUDENT.NAME as STUDENT_NAME, INSTRUCTOR.ID as Instructor_ID,COURSE.TITLE  FROM INSTRUCTOR ,TEACHES,COURSE, TAKES, STUDENT   WHERE TEACHES.COURSE_ID=COURSE.COURSE_ID AND TAKES.COURSE_ID = COURSE.COURSE_ID AND STUDENT.ID = TAKES.ID  \end{verbatim}  Above is normal query which results in left-deep Now we force to build bushy  tree on oracle by breaking down the queries to two sub queries. While sub queries result in  \begin{verbatim}  WITH  t1 as (SELECT /*+ no_merge */ INSTRUCTOR.ID as Instructor_ID, COURSE.COURSE_ID, COURSE.COURSE_ID as T1_ID  

FROM t1, t2   WHERE t1.T1_ID = t2.T2_ID;  \end{verbatim}  Here we have forced to build bushy tree by breaking down the queries to two sub queries. While sub queries result in