Import#

Bulk Import Benchmarking#

Dolt supports three modes of import:

  1. LOAD DATA INFILE SQL-server command.
  2. dolt table import CLI command.
  3. dolt sql < import.sql batch script import.

We recommend (1) > (2) > (3) for large import performance. dolt table import is the most convenient and only slightly slower than LOAD DATA INFILE. Refer to the import tutorial blog for a walkthrough of the different techniques.

Import comparison#

Each result row reports the runtime for a MySQL import of a certain table schema (test_name and detail), row count (row_cnt), and sorting (sorting). sql_mult and cli_mult distinguish the Dolt SQL (sql-server LOAD DATA) and CLI (dolt table import) latencies as a multiple of the MySQL latency for the same test conditions. All MySQL tests report the LOAD DATA latency.

We are about 2x slower than MySQL for most import conditions. We are slightly slower importing blobs, reflecting how Dolt chunks blobs individually as prolly trees rather than a single byte array. Both Dolt and MySQL are less efficient importing sql scripts with standalone INSERT rows compared to batched insert script (we have a tool here to batch INSERT scripts).

test_namedetailrow_cntsortedmysql_timesql_multcli_mult
batchingLOAD DATA1000010.080.88
batchingbatch sql1000010.131.62
batchingby line sql1000010.131.54
blob1 blob20000011.293.523.78
blob2 blobs20000011.294.854.92
blobno blob20000011.31.581.67
col typedatetime20000011.212.012.14
col typevarchar200000112.262.44
config width2 cols20000011.131.511.55
config width32 cols20000012.611.782.62
config width8 cols20000011.391.711.95
pk typefloat20000011.281.371.38
pk typeint20000011.151.471.57
pk typevarchar20000012.221.71.92
row count1.6mm160000018.021.781.85
row count400k40000012.061.661.68
row count800k80000014.11.751.79
secondary indexfour index20000015.861.291.39
secondary indexno secondary20000011.341.461.6
secondary indexone index20000011.731.61.7
secondary indextwo index20000013.191.371.46
sortingshuffled 1mm100000008.011.861.92
sortingsorted 1mm100000018.571.711.8