Subject | Re: Fastest method of moving records between databases? |
---|---|
Author | Paul R. Gardner |
Post date | 2011-05-20T14:49:31Z |
> Don't forget to disable all possible indexes.I did this and got a drastic improvement. Not sure why I didn't think of that originally!
> Or better yet, only add indexes and PK/FK constraints, as many as possible, the very end. (PK/FK indexes can't be disabled)FK's are dropped and readded. PK's are left alone for now. I believe it's faster with them since that's how I verify a record exists in order to update vs. insert. The read for this (and the update statement) are faster with these.
> I would suggest that you commit after 1,000 to 10,000 rows.I will modify this too.
> If the database is small (1GB) then consider using a RAM disk and eliminate all disk IO. That should improve performance by at least a factor of 5!This will run on clients servers. No way to know database size vs. RAM size.
> Are you using prepared statements with parameters?Yes I am.
[Non-text portions of this message have been removed]