Data will be ordered in descending order
CREATE TABLE t1(
pk CHAR(5),
a char(30),
b char(30),
PRIMARY KEY(pk) COMMENT "rev:cf1",
KEY(a)
) ENGINE=ROCKSDB COLLATE 'latin1_bin';
CREATE TABLE t2(
pk CHAR(5),
a CHAR(30),
b CHAR(30),
PRIMARY KEY(pk) COMMENT "rev:cf1",
KEY(a)
) ENGINE=ROCKSDB COLLATE 'latin1_bin';
CREATE TABLE t3(
pk CHAR(5),
a CHAR(30),
b CHAR(30),
PRIMARY KEY(pk) COMMENT "rev:cf1",
KEY(a)
) ENGINE=ROCKSDB COLLATE 'latin1_bin' PARTITION BY KEY() PARTITIONS 4;
Warnings:
Warning	1287	The partition engine, used by table 'test.t3', is deprecated and will be removed in a future release. Please use native partitioning instead.
set session transaction isolation level repeatable read;
start transaction with consistent snapshot;
select VALUE > 0 as 'Has opened snapshots' from information_schema.rocksdb_dbstats where stat_type='DB_NUM_SNAPSHOTS';
Has opened snapshots
1
SET @@GLOBAL.ROCKSDB_UPDATE_CF_OPTIONS=
'rev:cf1={write_buffer_size=8m;target_file_size_base=1m};';
set rocksdb_bulk_load=1;
set rocksdb_bulk_load_size=100000;
LOAD DATA INFILE <input_file> INTO TABLE t1;
pk	a	b
LOAD DATA INFILE <input_file> INTO TABLE t2;
pk	a	b
LOAD DATA INFILE <input_file> INTO TABLE t3;
Warnings:
Warning	1287	The partition engine, used by table 'test.t3', is deprecated and will be removed in a future release. Please use native partitioning instead.
pk	a	b
set rocksdb_bulk_load=0;
SHOW TABLE STATUS WHERE name LIKE 't%';
Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
t1	ROCKSDB	10	Fixed	1000000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL		
t2	ROCKSDB	10	Fixed	1000000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL		
t3	ROCKSDB	10	Fixed	1000000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL	partitioned	
Warnings:
Warning	1287	The partition engine, used by table 'test.t3', is deprecated and will be removed in a future release. Please use native partitioning instead.
ANALYZE TABLE t1, t2, t3;
Table	Op	Msg_type	Msg_text
test.t1	analyze	status	OK
test.t2	analyze	status	OK
test.t3	analyze	status	OK
test.t3	analyze	warning	The partition engine, used by table 'test.t3', is deprecated and will be removed in a future release. Please use native partitioning instead.
SHOW TABLE STATUS WHERE name LIKE 't%';
Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
t1	ROCKSDB	10	Fixed	1000000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL		
t2	ROCKSDB	10	Fixed	1000000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL		
t3	ROCKSDB	10	Fixed	1000000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL	partitioned	
Warnings:
Warning	1287	The partition engine, used by table 'test.t3', is deprecated and will be removed in a future release. Please use native partitioning instead.
select count(pk) from t1;
count(pk)
1000000
select count(a) from t1;
count(a)
1000000
select count(b) from t1;
count(b)
1000000
select count(pk) from t2;
count(pk)
1000000
select count(a) from t2;
count(a)
1000000
select count(b) from t2;
count(b)
1000000
select count(pk) from t3;
count(pk)
1000000
select count(a) from t3;
count(a)
1000000
select count(b) from t3;
count(b)
1000000
longfilenamethatvalidatesthatthiswillgetdeleted.bulk_load.tmp
test.bulk_load.tmp
# restart
DROP TABLE t1, t2, t3;
