I am programming Java application dealing with Apache Derby and i am searching for equivalent for "explain" statement (employed by mySQL for instance). It isn't employed in Derby. Can there be such like?
You will find similar things: First of all, there's derby.language.logQueryPlan=true, which creates query plan information towards the log file: http://db.apache.org/derby/docs/10.8/ref/rrefproper43414.html. Next, there's the RUNTIMESTATISTICS feature, which could capture the data to your program if you would like: http://db.apache.org/derby/docs/10.8/ref/rrefsqlj38831.html. Third, there's XPLAIN style, which captures query plan information into some tables within your database itself: http://db.apache.org/derby/docs/10.8/ref/rref_xplain_tables.html.
You need to most likely also spend a while reading through this: http://db.apache.org/derby/docs/10.8/tuning/ctundepth13055.html