I'm programming Java application working with Apache Derby and i'm looking for equivalent for "explain" statement (working for mySQL for example). It's not working in Derby. Is there something similar?
Some key features include: Derby has a small footprint -- about 3.5 megabytes for the base engine and embedded JDBC driver. Derby is based on the Java, JDBC, and SQL standards. Derby provides an embedded JDBC driver that lets you embed Derby in any Java-based solution.
The core of the technology, Derby's database engine, is a full-functioned relational embedded database-engine, supporting JDBC and SQL as programming APIs. It uses IBM Db2 SQL syntax.
Installation of DerbyDownload the latest Derby version from the Apache website http://db.apache.org/derby/. Choose the bin distribution and extract this zip to a directory of your choice. Also make the Derby tools available in your path: Set the environment variable DERBY_HOME to the Derby installation directory.
There are similar things: Firstly, there is derby.language.logQueryPlan=true, which writes query plan information to the log file: http://db.apache.org/derby/docs/10.8/ref/rrefproper43414.html. Secondly, there is the RUNTIMESTATISTICS feature, which can capture the statistics into your program if you want: http://db.apache.org/derby/docs/10.8/ref/rrefsqlj38831.html. Thirdly, there is XPLAIN style, which captures query plan information into a set of tables inside your database itself: http://db.apache.org/derby/docs/10.8/ref/rref_xplain_tables.html.
You should probably also spend some time reading this: http://db.apache.org/derby/docs/10.8/tuning/ctundepth13055.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With