List:General Discussion« Previous MessageNext Message »
From:Udo Stanja Date:October 5 1999 3:40pm
Subject:Re: Is it faster to import (eg. DBname < filename.txt) or to hard code INSERTs
View as plain text  
M wrote:
> 
> Hi,
> 
> 1. Is it faster to import a file with thousands of INSERT statements
> like this eg.
> 
> % mysql -h myhost -u me -pmypassword myDB < fileWithInserts.txt
> 
> 2. Or, to hard code the INSERT syntax into a C program, for example (I
> have a C program to extract data from file with fixed length fields),
> and insert the data straight into a table (with a loop)? I've done it
> this way eg.
> 
> mysql_query(sock, "insert into temp (product_no, product_name, qty)
> values (%s, '%s', %s)"
> 
> I don't have file privs in the 'user' grant table, so I cannot use
> LOAD
> DATA INFILE. I'm trying to work out the quickest way of doing this.
> Thanks for any help.
> 
> Michael
> 
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html"
> before
> posting. To request this thread, e-mail
> mysql-thread14999@stripped
> 
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail mysql-unsubscribe@stripped instead.


Hallo,
most there is it possible to use the following

load LOCAL data infile ...

in my case that was the solution. 

Udo
Thread
Is it faster to import (eg. DBname < filename.txt) or to hard code INSERTsM4 Oct
  • Re: Is it faster to import (eg. DBname < filename.txt) or to hard code INSERTsMartin Ramsch4 Oct
  • Re: Is it faster to import (eg. DBname < filename.txt) or to hard code INSERTs(Udo Stanja)5 Oct
    • Re: Is it faster to import (eg. DBname < filename.txt) or to hard code INSERTssinisa5 Oct