To FK or not FK
Posted in 1997
Here's a situation: Two tables (90 million rows each). To enforce integrity, I want to build a FK (foreign key) constraint on TabB, pointing back to TabA. However, even with TabA and TabB fragmented 10 and 6 ways, respectively, it takes over 26 hours to execute an alter table to add the FK (with the index already created). So....how are people doing it?? I presume you would use a trigger on TabB, and take the performance hit of firing the trigger. Can anyone suggest a better method?? FWIW, ODS 7.22 running on Sequent. Jon ---------------------------------------------------------------------------- --- Jon C. Vemo "Life is like a dogsled team, if you ain't the jvemo@cyberspace.com lead dog the scenery never changes." ---------------------------------------------------------------------------- ---