How to use RLV store in SAP IQ 16.0 - in-memory row-level versioning (RLV)

2162312 - How to use RLV store in SAP IQ 16.0  

1.Create an RLV dbspace dbsp1 with the db file file1.

CREATE DBSPACE dbsp1 USING PATH '/data01/iqtest/file1.iqrlv' SIZE 10000 IQ RLV STORE


2.Create an RLV enabled table in the dbspace or RLV enable an existing table.


Enable new table:

CREATE TABLE test1(rowid INT NOT NULL,col1 char(25) NOT NULL,col2 char(25) NULL,col3 varchar(25) NOT NULL,col4 varchar(25) NULL) ENABLE RLV STORE


Enable existing table:

ALTER TABLE test1 ENABLE RLV STORE


3.Verify the table is RLV enabled.

SELECT is_rlv FROM sysiqtab WHERE table_id = (SELECT table_id FROM systab WHERE table_name = 'test1')


4.Set the snapshot versioning option to "row-level".

SET  OPTION public.snapshot_versioning = 'Row-level'


5.开始测试并行 insert  -- 测试10个并发插入, 18万记录 22秒 。
insert into  test1   values
(aa,bb,cc),
(dd,ee,ff) .... 

 

请使用浏览器的分享功能分享到微信等