I've created a table with a generated column based upon another NOT NULL column.
the new generated column is part of 1 or more indexes
the new table is populated by means of a load
I'm on a time-critical path, so I would not like time-consuming "set integrity's" after the load has finished
create table nw
( nw_id int not null
, nw_ts timestamp not null
, nw_gen int generated always as ((year(nw_ts) * 100) + month(nw_ts))
create index xx on table nw (nw_id asc , nw_gen asc);
declare x1 cursor for select a , b from another_table;
load from x1 of cursor modified by ???? insert into nw;
So I concider:
- load with "modified by generatedmissing"
- load with "modified by generatedignore"
- load with "modified by generatedoverride"
I cannot work out what is the best option for me to use. It could be my bad google-skills, or my bad english or my limited intelligence or the "set integrity" can never by avoided.
Why do you need to override the generated column values? I would let LOAD do the job by specifying "generatedmissing".
That was my iniital idea, but then the table was left in "integrity pending state" and was trying to avoid that.
Can I use the "generated missing" in combination with "inmediate unchecked"?
This area is the most "blurry part of db2" to me.