I am having a single partitioned java stored procedure in Voltdb. I need to get the partition id of the current partition in which the procedure is running. How do I get that within the procedure?
Asked
Active
Viewed 122 times
0
-
There isn't a public API for this. Can you explain why you want to do this within a procedure? – BenjaminBallard Oct 24 '16 at 15:11
-
I wanted to know how many transaction went through a partition by adding count into a table with primary key as partiton_id – Shamith Kumar Oct 25 '16 at 15:22
1 Answers
0
Rather than maintaining your own transaction counts in a table, you could call the @Statistics system procedure:
SQL> exec @Statistics PROCEDUREPROFILE 0;
This provides statistics for each procedure for each partition.
SQL> exec @Statistics TABLE 0;
This provides the count of how many records per table per partition.

BenjaminBallard
- 1,482
- 12
- 11