diff --git a/importer/config.go b/importer/config.go index 735fc126e..2daad7f52 100644 --- a/importer/config.go +++ b/importer/config.go @@ -33,9 +33,9 @@ func NewConfig() *Config { fs.StringVar(&cfg.TableSQL, "t", "", "create table sql") fs.StringVar(&cfg.IndexSQL, "i", "", "create index sql") - fs.IntVar(&cfg.WorkerCount, "c", 1, "parallel worker count") - fs.IntVar(&cfg.JobCount, "n", 1, "total job count") - fs.IntVar(&cfg.Batch, "b", 1, "insert batch commit count") + fs.IntVar(&cfg.WorkerCount, "c", 2, "parallel worker count") + fs.IntVar(&cfg.JobCount, "n", 10000, "total job count") + fs.IntVar(&cfg.Batch, "b", 1000, "insert batch commit count") fs.StringVar(&cfg.DBCfg.Host, "h", "127.0.0.1", "set the database host ip") fs.StringVar(&cfg.DBCfg.User, "u", "root", "set the database user") diff --git a/importer/config.toml b/importer/config.toml index 77526e8e2..c12d40168 100644 --- a/importer/config.toml +++ b/importer/config.toml @@ -6,9 +6,10 @@ index-sql = "create unique index u_b on t(b);" log-level = "info" -worker-count = 1 -job-count = 10 -batch = 1 +worker-count = 2 +job-count = 10000 +# batch insert rows +batch = 1000 [db] host = "127.0.0.1"