executor

executor — use to execute grouped sql file in parallel

Synopsis

java -jar lt_lightdb_executor.jar [url] [username] [password] [filePath]

Description

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)
    

Options

exector accepts the following command-line arguments:

url

JDBC connection string for target database.

username

username for login.

password

passord for login.

filePath

sql file to execute .

Diagnostics

The parallel count is the same as the number of CPU cores on the machine where lt_lightdb_executor.jar running.

Examples

$ java -jar lt_lightdb_executor.jar \
  "jdbc:postgresql://localhost:5432/postgres" "lightdb" "123" t.sql