Forum: Managing VoltDB

Post: system or metadata tables.

system or metadata tables.
rk1
Apr 12, 2012
How to find the sizes of each table ?.

I read about system stored procedure @Statistics, this needs programing to get this data. Are there any easier way to get metadata information.

If I want to find what is database name, configuration used, number of tables, table sizes, indexes, etc.. . Something similar to system tables in RDBMS databases.

Thanks
RK
For general browsing of the
bballard
Apr 12, 2012
For general browsing of the schema, the quickest way is using the left side navigation pane on VoltDB Studio, which you can access by connecting to any node in a running VoltDB cluster using the following URL:
http://hostname:8080/Studio

Within VoltDB Studio, you can also open query windows and run the following commands to get the Table and Index sizes:
exec @Statistics TABLE 0
exec @Statistics INDEX 0

If you want to query the same information directly, you can connect to VoltDB with a client, the SQLCMD tool, or through the HTTP JSON interface (which VoltDB Studio uses) to call system procedures directly. The @SystemCatalog procedure provides schema information, and the @Statistics procedure provides size and usage statistics. These and other system procedures are documented in Appendix E of Using VoltDB G. System Procedures
Thanks for the pointers. If I
rk1
Apr 14, 2012
For general browsing of the schema, the quickest way is using the left side navigation pane on VoltDB Studio, which you can access by connecting to any node in a running VoltDB cluster using the following URL:
http://hostname:8080/Studio




Thanks for the pointers.

If I want to insert rows from text file into voltdb, which is the simplest template that should be referred ?. We have tried using sqlcmd, the performance is terrible, several hundred times slower than other databases.

RK
Loading CSV file?
nshi
Apr 14, 2012
Thanks for the pointers.

If I want to insert rows from text file into voltdb, which is the simplest template that should be referred ?. We have tried using sqlcmd, the performance is terrible, several hundred times slower than other databases.




Hi RK,

By saying text file, do you mean CSV file or SQL file?
SQLCmd is currently not very performant for loading data from files. It is a utility program for database inspection during development mainly.

For loading data from a file, the most efficient way is to write an asynchronous client program to read the file and insert line by line by calling the corresponding insert procedure. If the target table is a partitioned table, VoltDB will generate an insert procedure for you with the name TABLE.insert automatically. You can see this in the output of the compiler when you compile the catalog.

Once all the data is loaded into the database, you can take a snapshot so that it can be restored much more efficiently next time.

Ning