>Thanks Jack and Jeremy.

>But this is part of my application and I need to do
>this automatically. I don't want to write a
>server-client application to just to handle file
>transimission and do pass the update cmd to local
>server. Any idea? Thanks.

If you have ssh installed on both machines....this could be done with two
commands....If you set up passwdless ssh authentication, this could be
automated in a script.  even if you don't you'd just have to type your
password.

scp ./cmd.sql [EMAIL PROTECTED]:/path/to/cmd.sql
ssh [EMAIL PROTECTED] '/path/to/mysql -u user -pPassword DBname
< /path/to/cmd.sql'

I use stuff like this all the time and it works wonderfully.

HTH...and i didn't miss the point.
Jeff

William

--- Jack Coxen <[EMAIL PROTECTED]> wrote:
> I'm guessing here but it sounds like you have the
> cmd.sql file on your local
> machine (in Europe).  If that's the case, compress
> the file, ftp it to the
> US server, uncompress it and do the load locally on
> the US server.
>
> If you're doing the update remotely, you're probably
> being killed by
> transmission time.  Transferring the file in toto to
> the US server will be
> quicker than having the communications lag of doing
> sending a command from
> Europe to the US, having the command execute and
> then receiving the status
> back in Europe...times 5000 records.
>
> Hope this helps,
>
> Jack
>
> -----Original Message-----
> From: William Wang [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 06, 2004 1:12 PM
> To: [EMAIL PROTECTED]
> Subject: many updates really slow
>
>
> Hi everyone,
>
> Please help.
>
> I have MySQL server running on host A in US and I am
> using it on host B in Europe. Every query takes
> about
> 0.3 seconds.
>
> Now I want to do update db with 5000 updates. So I
> put
> all the "UPDATES" commands in a file cmd.sql and do:
>
> mysql -hA < cmd.sql
>
> and it takes 30 MINUTES which is reasonable: 0.3 *
> 5000 but unbearable.
>
> Is there any better way to do this? Am I doing
> something stupid? Thanks a lot.
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs
> http://hotjobs.sweepstakes.yahoo.com/careermakeover
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
>
http://lists.mysql.com/[EMAIL PROTECTED]
>





__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]







-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to