The following contains notes from various attempts at migrating 2.5GB of MS SQL Server data to MongoDB, on an 8 GB, quad-core, 64-bit Windows 7 Enterprise machine.
- [TERMINATED] http://mssql2mongo.codeplex.com/ : Simple to use. Exponential slowdown observed in migration. For a total of the 50 million records spanning two tables, the following migration times were observed: 1 second for the first 100,000 records, 30 minutes for 1,000,000, 20 hours for 16 million (after which I terminated the process).
- [DID NOT WORK] http://rubydoc.info/gems/mongify/ : A ruby-based approach. Use Ruby 1.9.3 (tiny_tds dependency causes problems with Ruby 2.0). Install DevKit before installing the mongify gem. Also, use 'sqlserver' as the adapter in the .config file. Then, before running 'mongify check <config-file>', install the gems activerecord-sqlserver-adapter and tiny_tds. At this stage, it fails. 'mongify translation <config-file>' fails as well.
- [MODIFIED/WORKED!!] http://mssql2mongo.codeplex.com/ :
- introduced concurrency (since both SQL SERVER read and MongoDB write support it!)
- tweaked and customized page size for each table (trial-and-error)
- This version works great -- about 45 minutes to migrate the whole data.
- Note: Ensure that indices are created on the primary keys of all the tables.
- Only one source file is changed (see patch)