Managing the KEYS table for non-sequential key enabled tables
HCL Commerce provides data load utilities to load data. If you are using a custom utility to load data into HCL Commerce tables, you must update the corresponding entries in the KEYS table.
About this task
Note: It is
not required to update the KEYS table manually when you use HCL Commerce provided utilities to
load data.
Procedure
- For the tables with column KEYS.nonsequential = '0', update the entries in the KEYS table.
-
For the tables with column KEYS.nonsequential = '1', run the following SQL statements.
For example, if you are using the ORDERS table:
update keys set counter = (select coalesce(max(orders_id),0) from orders where orders_id>=lowerbound*multiplier and orders_id<upperbound*multiplier)/multiplier+1 where tablename='orders'; update keys set counter = lowerbound where tablename='orders' and counter = 0;
Note: Do not update theLOWERBOUND
orUPPERBOUND
parameters.