db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anurag Shekhar <Anurag.Shek...@Sun.COM>
Subject Re: questions about querytreenode and optimization
Date Thu, 12 Jul 2007 13:03:36 GMT
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