Just found the speed for importing sorted csv file is faster than the speed for importing unsorted csv file in TDengine database, each csv file has 1000000 rows, the only difference is one file has timestamp sorted, the other has timestamp unsorted.
Anyone can explain why importing sorted csv file is faster?
taos> create table if not exists t1(ts timestamp, c1 int, c2 float, c3 int, c4 int);
Query OK, 0 of 0 row(s) in database (0.001659s)
taos> insert into t1 file 'unsorted.csv';
Query OK, 1000000 of 1000000 row(s) in database (2.025508s)
taos> create table if not exists t2(ts timestamp, c1 int, c2 float, c3 int, c4 int);
Query OK, 0 of 0 row(s) in database (0.001335s)
taos> insert into t2 file 'sorted.csv';
Query OK, 1000000 of 1000000 row(s) in database (0.994504s)