Forum: Managing VoltDB

Post: VoltDB used memory size information

VoltDB used memory size information
alessandro.portosa
Mar 5, 2015
Hello!

Is there any standard way (via SQL statement) to get the used memory size? I know about the existence of @Statistics(Memory) to call a stored procedure, but I need to get this data from standard SQL statement.

Any change to do so? Maybe there is nothing similar to HSQLDB (SELECT 0 FROM INFORMATION_SCHEMA.SYSTEM_USERS).

Regards,
A.
pzhao
Mar 5, 2015
Alessandro,

We do not have SQL statement style syntax as you've described. Besides using stored procedure or our VMC, you can also use sqlcmd tool:
echo "exec @statistics memory, 0;" | sqlcmd

Are you trying to run a bunch of sql statements, where one of them is to check memory usage?

Peter Zhao
alessandro.portosa
Mar 6, 2015
Alessandro,

We do not have SQL statement style syntax as you've described. Besides using stored procedure or our VMC, you can also use sqlcmd tool:
echo "exec @statistics memory, 0;" | sqlcmd

Are you trying to run a bunch of sql statements, where one of them is to check memory usage?

Peter Zhao


A first step to integrate VoltDB in our product is to use it as cache to store temporary tables. To handle the quota, we need to know the amount of memory already used.
Are there any system users table that can provided this? I can't use anything except standard SQL statement in the Java code...
pzhao
Mar 6, 2015
Alessandro,

Please take a look at the bottom of @Statistics.
You'll find some sample code that calls @Statistics and try the MEMORY parameter. See if that helps.

Peter Zhao