db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dag.Wan...@Sun.COM (Dag H. Wanvik)
Subject Re: Reg: tracing of derby functioning
Date Wed, 25 Jul 2007 18:18:02 GMT
Kristian Waagan <Kristian.Waagan@Sun.COM> writes:

> anuj bhargava wrote:
>> Hello
>> I am Anuj and I am working on my final year project for which  i
>> need to understand internals of derby specially locking. I have gone
>> through transaction and lock modules in derby. but i still didn't
>> get it fully.
>> Is there any way or tool  to trace functioning of derby like when a
>> transaction comes, which function is used to form query tree and

Some more tracing hints:

There is a property that allow you to trace statements as they are
executed, cf.derby.language.logStatementText

You can also trace the compilation and see the results of the optimized
query plan derby.language.logQueryPlan

If you download a debug version of Derby, the property
derby.debug.true=<flag> can be used to get more information from the
compiler phases, e.g. this way
-Dderby.debug.true=DumpOptimizedTree. Check the source to see what flags
are available.

Example from GenericStatement.java:

>> then optimization , and then how it interacts with lock manager like
>> what type of lock it gets, which function is used to release locks
>> and then commit transaction, where updated values before and after
>> updatation are stored if transaction is update one.

You may find the diagnostic table expression SYSCS_DIAG.LOCK_TABLE
useful to see what locks are set at a given time, see

Good luck!


View raw message