shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

Optimization scaling importer performance

Open avalon5666 opened this issue 6 years ago • 2 comments

We can merge and batch execute the rows change to optimization performance.

Merge

insert + insert -> insert(dumper back off) insert + update -> insert insert + delete -> delete update + insert -> insert(dumper back off) update + update -> update update + delete -> delete delete + insert -> insert delete + update -> update(dumper back off) delete + delete -> delete

Batch Execute

  1. delete
  2. insert
  3. update

avalon5666 avatar Oct 18 '20 13:10 avalon5666

Good job.

Lucas-307 avatar Oct 19 '20 03:10 Lucas-307

Case 2: insert + update -> insert

If the program occur exception after a data inserted, and then this data updated. By resume from break-point dumper back off, program received insert + update, which will merge to insert. This data will ignored by INSERT IGNORE sql .

So maybe you should use REPLACE INTO sql or other plans.

Lucas-307 avatar Oct 20 '20 03:10 Lucas-307