You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Amir Michail <am...@gmail.com> on 2007/02/04 21:09:52 UTC
indexes
Hi,
Is there a way to get derby db to give a warning whenever it processes
a query that would benefit significantly from the creation of
additional index(es)?
Also, how do I find out all the (possibly compound field) indexes that
have been created for a table?
Finally, is there a way to dump the db to a file of SQL commands that
can be used to reconstruct the db?
Amir
Re: indexes
Posted by Bryan Pendleton <bp...@amberpoint.com>.
> Also, how do I find out all the (possibly compound field) indexes that
> have been created for a table?
>
> Finally, is there a way to dump the db to a file of SQL commands that
> can be used to reconstruct the db?
Hi Amir,
I don't know a way to get any suggestions about indexes which could have
been used. Regarding your other questions:
- "show indexes from t;" in ij will show you all the indexes for table t.
- "dblook" will show you the DDL for your database. See
http://db.apache.org/derby/docs/dev/tools/ctoolsdblook.html
Note that this is just the schema, not the data. If you want the data,
you could export the data using the bulk export procedure, or use
ddlutils: http://db.apache.org/derby/integrate/db_ddlutils.html
Hope this helps.
thanks,
bryan