Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need help with MySQL: At the mysq

Status
Not open for further replies.

itc1

IS-IT--Management
Sep 18, 2003
65
US
I need help with MySQL: At the mysql> prompt, I enter:

Load data local infile “/ into table 2003data fields terminated by '\t' lines terminated by ‘\n’;

This command appends to 2 primary mySQL tables. The problem is that it takes very long to process and it never returns to a prompt which will let me know that it's completed. I have to log out of the hyperterminal process and log back in and do a show processlist;

Is there anyway to speed up the process and determine when its completed. Thanks for any assistance.
 
hi sleipnir214, the alldata table contains articles going back to 1995, the 2003 data contains articles for the year 2003. So I guess the answer to your question is that the files contain data. We update our website weekly. Thanks
 
sleipnir214, I believe the files are on the sasme machine. I looked on the FTP where our web files are uploaded and saw the 2003.doc file but can't find the alldata file on the server or on this end. After the command completes I enter the following command:
Load data local infile “/ into table alldata fields terminated by '\t' lines terminated by ‘\n’;

This statement will merge the delimited file (2003.doc) into the mySQL table alldata. This takes only 1-2 minutes.
 
If the datafiles are on the filesystem of the MySQL server, don't use the "LOCAL" keyword. That keyword causes the datafile to be loaded into the server through the database connection, which will slow down the load.

Just use "LOAD DATA INFILE...". The MySQL server can then just open the file from the filesystem.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
sleipnir214, Thank you so much. I will try this the next time we run the process. I will also try to find out if the files are on the filesystem of the MySQL server. As you can tell I did not create this process I am taking over from someone who started this. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top