Please look at the following:
memsql> show partitions;
+---------+-----------+------+--------+--------+
| Ordinal | Host | Port | Role | Locked |
+---------+-----------+------+--------+--------+
| 0 | 127.0.0.1 | 3307 | Master | 0 |
| 1 | 127.0.0.1 | 3307 | Master | 0 |
...
| 19 | 127.0.0.1 | 3307 | Master | 0 |
+---------+-----------+------+--------+--------+
20 rows in set (0.00 sec)
memsql> drop table test_table;
Query OK, 0 rows affected (0.02 sec)
memsql> CREATE TABLE test_table (
-> idx int,
-> name char(20),
-> in_ts timestamp(6) DEFAULT CURRENT_TIMESTAMP,
-> SHARD KEY(idx),
-> KEY (idx) USING CLUSTERED COLUMNSTORE
-> );
Query OK, 0 rows affected, 1 warning (0.03 sec)
memsql> select now(6);
+----------------------------+
| now(6) |
+----------------------------+
| 2019-12-20 20:06:30.301243 |
+----------------------------+
1 row in set (0.00 sec)
memsql> load data infile '/home/madamgold/test'
-> INTO TABLE `test_table` (idx, name)
-> FIELDS TERMINATED BY ','
-> LINES TERMINATED BY '\n';
Query OK, 20000000 rows affected (2.87 sec)
memsql> select now(6);
+----------------------------+
| now(6) |
+----------------------------+
| 2019-12-20 20:06:33.175176 |
+----------------------------+
1 row in set (0.00 sec)
memsql> select distinct(in_ts) from test_table;
+----------------------------+
| in_ts |
+----------------------------+
| 2019-12-20 20:06:30.370743 |
| 2019-12-20 20:06:30.370713 |
...
| 2019-12-20 20:06:30.370978 |
+----------------------------+
20 rows in set (0.11 sec)
The automatically initialized in_ts
timetamp is the start time of the load data.
Can record at the time the load completes (ie. finish time)?
Thank you.