If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > import large .sql file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-16-08, 09:05
ankur02018 ankur02018 is offline
Registered User
 
Join Date: Jun 2007
Posts: 189
Smile import large .sql file

Hi ,
two way to upload sql file

source filename

and

mysql -u user name -p databasename<filename.sql

but

I want to upload large sql file 2 GB that will take long time to upload

is there any way to uplaod in fast many where we can use bulk insert

or any change in configration file my.ini to make fast upload
Reply With Quote
  #2 (permalink)  
Old 08-12-08, 16:17
webburu webburu is offline
Registered User
 
Join Date: Mar 2008
Posts: 4
I don't think there is a way to upload it faster than the command line, any one's suggestion?
Reply With Quote
  #3 (permalink)  
Old 08-14-08, 08:06
sassermann sassermann is offline
Registered User
 
Join Date: Aug 2002
Location: Germany
Posts: 17
Depending on your influence on the source file you may try to build it with bulk inserts instead of single row inserts:

insert into tbl_a (x,y) values (1,2), (4,5),...,(33,2);

in addition to this you can disable index maintenance for non unique keys for the affected tables first by

alter table tbl_a disable keys;

and afterwards

alter table tbl_a enable keys;

Hope this helps.


Andreas
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On