Oracle Database implementation of Charglt
It has the same basic functionality as charglt, adapted for Oracle Database — see TODO for known gaps.
Far more documentation about the benchmark itself is available at the link above.
- Oracle Database 19c or later (Oracle Free 23ai or XE also supported)
- Java 21
- Maven
Connect as SYSDBA (or a DBA-privileged account) and run:
sqlplus sys/password@//host:1521/service as sysdba @ddl/oracle_create_user.sql
This creates the charglt user/schema with the necessary privileges. The default password is charglt — change it in the file before running in any non-development environment.
Choose the DDL set that matches your Oracle version (see Schema version):
Oracle 19c (default):
sqlplus charglt/charglt@//host:1521/service @ddl/oracle_create_db.sql
Oracle 21c+:
sqlplus charglt/charglt@//host:1521/service @ddl/oracle_21c_create_db.sql
Choose the commit mode that matches your durability requirements (see Commit mode):
Oracle 19c, full ACID commits:
sqlplus charglt/charglt@//host:1521/service @ddl/oracle_create_procs_normal.sql
Oracle 19c, fast non-synchronous commits:
sqlplus charglt/charglt@//host:1521/service @ddl/oracle_create_procs_fast.sql
Oracle 21c+, full ACID commits:
sqlplus charglt/charglt@//host:1521/service @ddl/oracle_21c_create_procs_normal.sql
Oracle 21c+, fast non-synchronous commits:
sqlplus charglt/charglt@//host:1521/service @ddl/oracle_21c_create_procs_fast.sql
The default SendToKafka procedure is a no-op. See ddl/oracle_send_to_kafka.sql for outbox-table and Oracle Advanced Queuing alternatives.
mvn package -DskipTests
Connection details and schema version are set via environment variables:
| Variable | Default | Description |
|---|---|---|
ORA_HOST |
first CLI argument | Oracle Database hostname |
ORA_USER |
CLI argument | Database user |
ORA_PASSWORD |
CLI argument | Database password |
ORA_SERVICE |
FREEPDB1 |
Oracle service name (use XE for Express Edition, or your PDB/service name) |
ORA_VERSION |
19 |
Schema version mode: 19 for Oracle 19c+, 21 for Oracle 21c+ |
Port is always 1521. The JDBC URL format used is jdbc:oracle:thin:@//host:1521/service.
Two DDL paths are provided. The stored procedure interface is identical in both — no Java code changes are needed when switching versions.
ORA_VERSION |
DDL files | user_json_object type |
user_json_cardid |
|---|---|---|---|
19 (default) |
oracle_create_db.sql + oracle_create_procs_normal.sql or oracle_create_procs_fast.sql |
CLOB IS JSON |
Regular column, maintained by stored procedures |
21 |
oracle_21c_create_db.sql + oracle_21c_create_procs_normal.sql or oracle_21c_create_procs_fast.sql |
Native JSON type |
Virtual generated column (automatic) |
The oracle_remove_db.sql cleanup script works for both versions.
Each DML stored procedure (DelUser, GetAndLockUser, UpdateLockedUser, UpsertUser, AddCredit, ReportQuotaUsage) issues a commit at the end of every successful write path. Two variants are provided:
| File suffix | Commit statement | Behaviour |
|---|---|---|
_normal |
COMMIT; |
Full ACID — redo written synchronously to disk before returning |
_fast |
COMMIT WRITE BATCH NOWAIT; |
Higher throughput — redo batched and written asynchronously; individual transaction durability is not guaranteed on crash |
Use _normal for production workloads where data loss is unacceptable. Use _fast for benchmarking or workloads that tolerate losing the last few transactions after a crash.
hostname usercount tpms maxinitialcredit username password
Example — load 100,000 users at up to 10 transactions per millisecond, each starting with up to 1,000 units of credit:
10.13.1.101 100000 10 1000 charglt charglt
hostname usercount tpms durationseconds queryseconds username password workercount
Example — run against 100,000 users at 10 tpms for 120 seconds, printing global stats every 30 seconds, using a single thread:
10.13.1.101 100000 10 120 30 charglt charglt 0
hostname usercount tpms durationseconds queryseconds jsonsize deltaproportion username password workercount
Example — 100 users, 1 tpms, 60 seconds, stats every 15 seconds, 100-byte JSON payloads, 50% delta updates:
10.13.1.101 100 1 60 15 100 50 charglt charglt 0
hostname usercount tpms username password
user_table.user_json_objectis stored asCLOB IS JSON(19c) or nativeJSONtype (21c+), selected by the DDL path used at install time.user_json_cardidis a regularNUMBER(19)column in 19c mode, updated by stored procedures on every write. In 21c+ mode it is a virtual generated column computed automatically from$.loyaltySchemeNumber. Both modes create an index on this column.- All stored procedures are Oracle PL/SQL. Status-returning procedures use
OUT NUMBER/OUT VARCHAR2parameters. Multi-row procedures (GetUser,GetUsersWithMultipleSessions,showTransactions) return aSYS_REFCURSOR. Java calls all procedures viaCallableStatement. - Kafka integration is stubbed as a no-op
SendToKafkaprocedure. Oracle has no equivalent topg_notify; seeddl/oracle_send_to_kafka.sqlfor alternatives using an outbox table or Oracle Advanced Queuing (DBMS_AQ).
sqlplus charglt/charglt@//host:1521/service @ddl/oracle_remove_db.sql
To also drop the user/schema entirely (run as SYSDBA):
DROP USER charglt CASCADE;- Implement
ShowCurrentAllocations(running totals), present in the VoltDB original. - Scaled multi-worker tests have not yet been validated end-to-end.