executor — use to execute grouped sql file in parallel
java -jar lt_lightdb_executor.jar [url] [username] [password] [filePath]
A batch of SQL divided into groups defined in text file. The SQL of the same group is executed sequentially in the same thread, and different groups are executed concurrently.
File format is ${group},${sql} pre line, use ',' to separate group and sql, sql can not contain character '"'.
Here is a simple example file:
group1, create table test(v int)
group1, insert into test(v) values(1)
group2, create table test2(v int)
group2, insert into test2(v) values(1)
exector accepts the following command-line arguments:
urlJDBC connection string for target database.
usernameusername for login.
passwordpassord for login.
filePathsql file to execute .
The parallel count is the same as the number of CPU cores on the machine
where lt_lightdb_executor.jar running.
$java -jar lt_lightdb_executor.jar \ "jdbc:postgresql://localhost:5432/postgres" "lightdb" "123" t.sql