Re: moving data from mssql to mysql on linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a project where I need to connect to a remote SQL Server and move
data from their to my localy MySQL server.  On the remote SQL Server, I only
have access to a few views but need to get their data and move it to my
local MySQL db.  What is the best way to do this?  I have freetds compiled
and configured for php on my server and currently connect to the SQL Server,
do my query and then loop through the result inserting into MySQL a row at a
time but this just takes to long....is there a better way?

Look at disabling indexes until the inserts are done. Also "insert delayed" or "insert ignored"... (don't remember the exact specifics). If it's innodb, wrap the inserts in a transaction and commit every 100 rows or so.

Also, before spending too much time on it, you'll never get faster than you can query out of sqlserver... so if that's the bottleneck not much you can do about it.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux