dbsql

dbsql [OPTIONS] FILENAME SQL 

dbsql is a command line tool that provides access to the Berkeley DB SQL interface. To build this tool, run the configure script with the --enable-sql option when you are building the Berkeley DB SQL interface. For more information on building this tool, see "Building for UNIX/POSIX".

FILENAME is the name of a Berkeley DB database file created with the SQL interface. A new database is created if the file does not exist. The options are as follows:

The dbsql executable provides the same interface as the sqlite3 executable that is part of SQLite. For more information on how to use dbsql see the SQLite Documentation page.

Command Line Features Unique to dbsql

This section describes pre-defined query statements that can be executed from the dbsql command line.

.stat ?ITEM?

Prints statistics

If ITEM is :env:, then this command prints statistics for the Berkeley DB environment using the DB_ENV->stat_print().

dbsql> .stat :env:

If ITEM is the name of a table or index, then this command prints statistics for the table or index using the DB->stat_print().

dbsql> .stat example

If ITEM is not specified, then this command prints statistics for the Berkeley DB environment followed by statistics for all tables and indexes within the database.

dbsql> .stat