Re: Needed: An Efficient, reliable and smart way to copy data from one DB to another



Ted Byers wrote:
> "Hal Rosser" <hmrosser@xxxxxxxxxxxxx> wrote in message
> news:plbhf.9624$KP1.1427@xxxxxxxxxxxxxxxxxxxxxxxxx
>> [snip]
>> There's an easier way -
>> create a DSN for your SQL database
>> Then right-click the table in Access and choose 'Export'
>> You can export the whole table easily that way.
>> I used this method to export tables from Access to mySQL, so I'm sure it
>> will also work to MS-SQL.
>>
>>
> There is a much easier way. I visited the MySQL site today and found they
> have a new migration tool. I used it to transfer the data in a matter of
> minutes. Now I'd like to see the source code for that tool so I can see how
> they did it so quckly.
>
> Cheers,
>
> Ted
>

Ted,

They did it using JDBC, but the migration toolkit uses "bulk" inserts of
the form:

INSERT INTO [table] VALUES (...),(...),(...)

This form of insert statement is optimized inside the MySQL server in
that it does the index update(s) all in one go for all elements of the
insert, rather than row-by-row as a simple single-row insert would do.

The migration toolkit will build a query of this size up to 5MB or so,
or the maximum sized query that your MySQL server is confiugred to accept.

My guess is that your entire table (or at least most of it) was sent as
a single statement to MySQL, which is why this method is much quicker
than the other alternatives you tried.

-Mark

.



Relevant Pages

  • Re: [OTish] migrating from Access to .sql
    ... MySQL as destination, and it won't allow Agent-based migration. ... I remember i was really pleased with MySQL's Migration Toolkit and all ... but i'd like to use a .sql file so i can make ... Hi Nuno. ...
    (Debian-User)
  • [OTish] migrating from Access to .sql
    ... MySQL as destination, and it won't allow Agent-based migration. ... I remember i was really pleased with MySQL's Migration Toolkit and all ... but i'd like to use a .sql file so i can make ...
    (Debian-User)
  • Re: migrating MSSQL databases to MySQL
    ... I want to migrate databases in microsoft sql server 2005 express ... edition to mysql, please anyone can tell me how can i do this.. ... tried installing mysql migration toolkit, but i am getting error, ... work with migration toolkit or any other tools available to migrate. ...
    (comp.databases.ms-sqlserver)
  • migrating MSSQL databases to MySQL
    ... I want to migrate databases in microsoft sql server 2005 express ... edition to mysql, please anyone can tell me how can i do this.. ... tried installing mysql migration toolkit, but i am getting error, ... work with migration toolkit or any other tools available to migrate. ...
    (comp.databases.ms-sqlserver)
  • Re: [PHP] mysql query and maximum characters in sql statement
    ... Can anybody tell me how to fix this error and reduce the inserting time with ... a single statement instead of writing more insert statements ... check with a MySQL list via http://www.mysql.com ...
    (php.general)