Re: Loading Tables From Unload Files
Posted in 1995
DWoltkamp (dwoltkamp@aol.com) wrote: : I wonder if I might be able to get a definitive answer to a question that : has been making the rounds for a long time? : Is is better to load tables without indexes and create the indexes after : the load, or load the table with indexes in tact? : I'm not concerned with the speed of loading tables, but more concerned : with performance after the load is completed. : Any answers and opinions are welcome... Thank you. You don't say which version you run, but as a general rule, it is better to load the tables without indexes and without constraints (if possible), then create the indexes/constraints. In versions earlier than 7.0 this is especially so (I'm not so sure about 6.0...this may or not be valid) where you do not have the option of placing the indexes in a separate dbspace, your indexes will be more contiguous if they are created after the data is loaded. In versions 5.0X and earlier, the index pages and data pages share the same extents. You'll have index pages interspersed with data pages if you load with indexes in place. If you create the indexes after the load, the loaded data will probably be contiguous (or more so at least) and when you create the indexes, they will be more contiuous also. This makes indexed searches more efficient. In 7.0X (maybe 6.0X?), you can put the indexes in their own dbspaces and this is less critical. In 6/7 you have more efficient index creation because of the parallel nature of the beast, so you'll probably be able to load without indexes and then create your indexes in a shorter time than loading with the indexes in place. Joe -- --------------------------------------------------------------------------- Joe Lumbley(jlumbley@netcom.com) Dallas, Texas ----------------------------------------------------------------------------