db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aakash Bordia" <bor...@gmail.com>
Subject Re: questions about querytreenode and optimization
Date Thu, 12 Jul 2007 14:10:46 GMT
Thanks Anurag, I did look at the documentation and the debug property you
mentioned. I wanted to mention that I am in the debugger, and whatever I
asked was in context of that (that is while debugging the code, I am not
sure where to find the access path in the QTN once the optimize method is
done with. Same for the second question).

Thanks
Aakash


On 7/12/07, Anurag Shekhar <Anurag.Shekhar@sun.com> wrote:
>
> QueryTreeNode is constructed while parsing the sql statement. This is
> the base class of all
> the node created while parsing the sql statement. Probably you should
> look at  java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj to
> see how three is generated.
> You can print the parse tree by turning on debug on "DumpParseTree".
>
> Best place to start on optimization will be the paper on derby optimizer
> http://db.apache.org/derby/papers/optimizer.html
>
> I am not sure if I have understood the your question about AccessPath can
> you please elaborate it ?
> anurag
>
> Aakash Bordia wrote:
> > Hi, I am issuing a simple join query like:
> > select * from t1,t2 where t1.c1=t2.c1;
> >
> > Here comes my novice questions(bear with me if some of these dont make
> > sense, trying to learn the compiler part):
> >
> > 1) I am not sure where to look for the accesspath(both base tables and
> > join),  as the values in AccessPathImpl (at join or PRN or base table
> > level) seem un-intuitive.
> >
> > 2) Also it seems we hang the Level2OptimizerImpl objects off of the
> > base table FromBaseTable, but I dont see it up in the tree anywhere.
> > Is there a reason for this?
> >
> > Any other pointers for learning about the querytreenodes are appreciated
> !
> > Thanks
> > Aakash
>
>

Mime
View raw message