Bonjour,
MW> I just checked the code; The current 'send_file_to_server' code
MW> reads the file in 15K packets and sends these (compressed) one by one.
Can't this be configured ?
MW> Yes, if the server and client are compiled with the compressed
MW> libraries. If not, the protocol will automaticly fall back to not use
MW> compression.
Compressed libraries ? Are they part of the MySQL-3.22.21
sources distribution ? In order to compile and install Mysql, I get
mysql-3.22.21.tar.gz .
MW> The easiest way to check this is to monitor the trafic between the
MW> server/client :)
I will try to do that.
MW> In this case, you will probably be better off by using LOAD DATA.
Yes. So I have to get back to my previous solution which sends the
file through FTP and then do a LOAD DATA INFILE.
BAUMEISTER>> Isn't there a simple way to add an option which would tell the
BAUMEISTER>> server to do the insert into the table only once it has received all
BAUMEISTER>> the data (for LOAD DATA _LOCAL_) ?
MW> Not really. This would involve buffering the whole file (which may be
MW> of ANY size).
Yes. But this could be a variable configurable my the server
administrator. For example 'LOAD DATA LOCAL SHORT_LOCK' option would
tell to receive data in a buffer which max size could be configured
with 'max_load_data_local_shortlock' variable. This could be a great
improvement.
BAUMEISTER>> If for example someone uses LOAD DATA LOCAL in order to update a
BAUMEISTER>> remote table with large files on a slow network, the delay while all
BAUMEISTER>> SELECT on this table will be locked may be a REAL problem. Don't you
BAUMEISTER>> agree ?
MW> Yes; In this case it's better to not use LOCAL. Have you thought
MW> about using multi-line inserts instead ?
But I was always told that LOAD DATA is a lot more accurate than
multi-line inserts ...
And the file I'm sending to the server have about 100-200 lines and
sometimes more than 2000.
Regards,
Alex.