Satheesh Bandaram wrote: > Some answers below.... > > Daniel John Debrunner (JIRA) wrote: > >> [ >> http://issues.apache.org/jira/browse/DERBY-464?page=comments#action_12361221 >> ] >> >>spec> DDL statements directly invoke executing mechanism simplify the >>implementation at the cost of a small increase in execution time. >> >>I don't think that's true. DDL''s are not slower due to using a constant >>action. That's not the reason for the way they are handled. I think the basic >>idea is that DDL's are limited in structure compared to DML and can easily be >>represented by an object that represents an action and a set of constants. >>DDL did generate a java class to execute the constant action but I cleaned >>that up to use a fixed implementation (sub-class) of BaseActivation , as >>otherwise each DDL would be generating an identical class. This was wasteful >>when most DDL is discarded after a single execution. >> >> > One side-effect of directly executing DDLs is that they need to be > compiled everytime... I think that is what I was refering to.. though I > don't see many useful cases where sharing a DDL plan would be useful. I > will modify the line.
I don't think that's the case. DDL statements are cached like any other statement. The exact same mechanism is used to exeucte constant action statements as other statements. Dan.
