RE: fast loading
Posted in 2001
Topics: Triggers, Constraints & Referential Integrity
SET INDEXES for table2 DISABLED; (load command); SET INDEXES for table2 ENABLED; Any constraints, etc? -----Original Message----- From: triggerfish2001@hotmail.com [mailto:triggerfish2001@hotmail.com] Sent: Thursday, January 04, 2001 7:51 AM To: informix-list@iiug.org Subject: fast loading Hi, I am using insert into table2 select * from table1. Is there a way to temporarily disable indicies on table2 when doing the above. The objective is to increase the speed of loading. TIA.
John says... > > >SET INDEXES for table2 DISABLED; >(load command); >SET INDEXES for table2 ENABLED; > >Any constraints, etc? Looks like there is a bug. I disabled all indexes and constraints before loading and started the load process. All small tables with reasonable number of rows ( less than 10000 rows) had no problem in loading. However for one relatively bigger table which needed 395027 rows to be loaded, the loading failed consistently with the error -243. The ISAM error was -103. Error -243 The database server cannot set the file position to a particular row within the file that represents a table. Check the accompanying ISAM error code for more information. A hardware error might have occurred, or the file might have been corrupted (truncated). Unless the ISAM error code or an operating-system message points to another cause, run the bcheck or secheck utility to verify file integrity. Error -103 The ISAM processor has been given an invalid key descriptor. For C-ISAM programs, review the key descriptor. Each key descriptor has a maximum of 8 parts and 120 characters. If the error recurs, please refer to the INFORMIX-OnLine Dynamic Server Administrator's Guide, Appendix B, "Trapping Errors," to acquire additional diagnostics. Contact Informix Technical Support with the diagnostic information. The server I am using is IDS 7.23.UC1 on HP 9000/778 running HP-UX 10.20. So I took the other route. I explicitly dropped all indices and constraints before loading and recreating it after loading. Works fine and much faster than loading with indices and constraints.