Do it this way: CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1); SELECT * FROM ....; VALUES SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS(); CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(0);
Replace the "SELECT * FROM ..." with your query. The "VALUES SYS..." will return one row, one column that contains the statement execution plan. I use SquirrelSQL client and run the first statement, run the query, run the "values". Look at the query plan, and then turn the statistics off. -----Original Message----- From: mogoye [mailto:[email protected]] Sent: Wednesday, August 31, 2011 10:10 AM To: [email protected] Subject: RE: Performance problem with derby Thanks a lot for your answer. But after few tries to use XPLAIN I did not succeed to learn any thing, I always get an error message when I run : CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1); CALL SYSCS_UTIL.SYSCS_SET_STATISTICS_TIMING(1); CALL SYSCS_UTIL.SYSCS_SET_XPLAIN_SCHEMA('MYAPP'); I did not succeed to run the 3rd command I always get a : Error: 'SYSCS_UTIL.SYSCS_SET_XPLAIN_SCHEMA' is not recognized as a function or procedure. SQLState: 42Y03 ErrorCode: -1 Error occured in: CALL SYSCS_UTIL.SYSCS_SET_XPLAIN_SCHEMA('MYAPP') My derby version is 10.8.1.2. Does any one have an idea ? Thanks again. -- View this message in context: http://old.nabble.com/Performance-problem-with-derby-tp32364853p32372414.html Sent from the Apache Derby Developers mailing list archive at Nabble.com.
