Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2007
    Posts
    197

    Smile Unanswered: 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

  2. #2
    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?

  3. #3
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •