Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

apache derby - explain select

Tags:

database

derby

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?

like image 546
planky Avatar asked May 12 '11 16:05

planky


People also ask

What are the key characteristics of Apache Derby?

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.

Does Derby use SQL?

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.

How do I set up an Apache Derby?

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.


1 Answers

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

like image 188
Bryan Pendleton Avatar answered Oct 16 '22 08:10

Bryan Pendleton