jwcolby
jwcolby at colbyconsulting.com
Thu Nov 1 13:22:24 CDT 2012
I attempted to insert 150 million records into a table, from one database to another. The destination table was empty but had a bunch of indexes on it. I ran out of room on the log file disk and the process hung. I ended up stripping off all of the indexes except the PK clustered index and the insert used less than 1/2 of the previous log file size for the insert. Furthermore the build of the indexes as a second step is essentially not using the log file at all. So the whole argument about "which is faster" also needs to include a component about log file usage. I have no idea which would have been faster - with or without the indexes already in place - but in this case at least stripping off the indexes and building them after the fact seems to make the whole process work without a (log file size) hitch. -- John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it