forums › forums › SQLyog › Using SQLyog › Import From Sql Statements Slow
- This topic is empty.
-
AuthorPosts
-
-
September 4, 2006 at 1:29 pm #9833DARABMember
When importing a database using Importing from SQL statements on one computer, it takes 30 minutes. When I import the same statements from the same file on another computer that has faster specs, it takes 12-15 hours. Are there settings in MySQL that would impove the import on the faster computer or are there SQLyog settings I need to change?
-
September 4, 2006 at 2:08 pm #22222peterlaursenParticipant
Is the .SQL generated with SQLyog and if yes how is BULK settings?
http://www.webyog.com/faq/24_101_en.html
I would experiment a little with different BULKs on BOTH servers! Say 100 KB, 400 KB, 1 MB, 4 MB, 10 MB for instance. But the difference is impressive!
also: Do you have direct connection to both? Note that if one (the slow one) is connected with HTTP-tunnel, the HTTP-connection will need to be (re-)established for each statement- and that may take a few seconds every time. So if you have individual INSERT statement (one statement per row and a million rows then calculate yourself (3 seconds * 1.000.000) – where NOTHING AT ALL happens!
-
September 4, 2006 at 6:40 pm #22223DARABMember
Thanks for responding Peter.
I forgot to mention that I'm importing SQL statements to my laptop locally so there is no network involved and it is still running slowly.
I'm assuming I need to make a change in the my.ini file of MySQL to alter the BULK setting. Do you know what the variable name is for BULK?
-
September 4, 2006 at 6:42 pm #22224peterlaursenParticipant
thx for quoting me .. but you may say something too 😮
-
September 4, 2006 at 7:11 pm #22225DARABMember
Sorry about that one post.
I meant to say:
Yes, I created the SQL statement file with SQLyog where I used the Export Database as SQL Statements…
I forgot to mention that I'm importing SQL statements to my laptop locally so there is no network involved and it is still running slowly.
I'm assuming I need to make a change in the my.ini file of MySQL to alter the BULK setting. Do you know what the variable name is for BULK?
-
September 4, 2006 at 7:36 pm #22226peterlaursenParticipant
the BULK setting is an internal SQLyog setting. It is not a MySQL server parameter.
the BULK specifies how long a generated INSERT statement will be allowed to be in the .SQL file.
You probably have some my.ini 'templates' (named like 'my.large', 'my.medium'. You can try to rename either of those to my.ini and see what difference it makes.
-
September 4, 2006 at 8:09 pm #22227DARABMember
When you say “the BULK setting is an internal SQLyog setting” are you referring to the “Max Packet Size (in K:cool: for BULK INSERT statements” on the General tab of Preferences in SQLyog? If so, I have unchecked Get Server Default and set the Custom Size to 10000 but no performance improvement.
-
September 5, 2006 at 12:00 am #22228peterlaursenParticipant
Yes that was what I meant. It is effective 1O MB. A big One.
-
September 5, 2006 at 3:50 pm #22229DARABMember
I have changed the “Max Packet Size (in K:cool: for BULK INSERT statements” on the General tab of Preferences in SQLyog to 10000. I ran the import again and it has ben running for over 12 hours and it looks like it has 4-6 hours to go. This same import took 35 minutes on a slower machine. I've compared the my.ini files between the 2 machines and if there are differences, my machine that is taking such a long time to import has higher settings. The version of MySQL on the machine that imports in 35 minutes is a slightly older version and is an alpha. Could there be a different MySQL file that has parameters I need to change?
-
September 5, 2006 at 7:40 pm #22230peterlaursenParticipant
I wish I could answer this!
anybody else?
-
September 7, 2006 at 8:56 am #22231TomBezMemberDARAB wrote on Sep 5 2006, 05:50 PM:I have changed the “Max Packet Size (in K:cool: for BULK INSERT statements” on the General tab of Preferences in SQLyog to 10000. I ran the import again and it has ben running for over 12 hours and it looks like it has 4-6 hours to go. This same import took 35 minutes on a slower machine. I've compared the my.ini files between the 2 machines and if there are differences, my machine that is taking such a long time to import has higher settings. The version of MySQL on the machine that imports in 35 minutes is a slightly older version and is an alpha. Could there be a different MySQL file that has parameters I need to change?
do the databases use different charsets?
what happens if you set your my.ini settings to the same values as the slower machine has?
does the slower machine have a raid-disk-subsystem (or something like a cache-controller)?
are the database engines on both machines the same? it looks like a bit like you would use INNO-DB for your laptop and myisam on the slower machine.
-
September 9, 2006 at 6:05 pm #22232DARABMember
do the databases use different charsets?
No.
what happens if you set your my.ini settings to the same values as the slower machine has?
No significant change.
does the slower machine have a raid-disk-subsystem (or something like a cache-controller)?
No.
are the database engines on both machines the same? it looks like a bit like you would use INNO-DB for your laptop and myisam on the slower machine.
INNO-DB for both.
-
September 9, 2006 at 7:32 pm #22233peterlaursenParticipant
Will the 'my.ini' from the fast machine work on the slow machine?
I think we should try if the reason for this in in MySQL configuration by 'reversing the files' if possible.
Is (various types of) logging and/or debugging enabled on the slow server?
Any idea if it could be network related? bad cable and such trivial things?
-
September 11, 2006 at 8:19 am #22234TomBezMemberDARAB wrote on Sep 9 2006, 08:05 PM:are the database engines on both machines the same? it looks like a bit like you would use INNO-DB for your laptop and myisam on the slower machine.
INNO-DB for both.
I think it is a problem of indizis, looks like to me that on the slower machine they are deactivated during bulk insert and on the faster machine they are activated.
-
September 13, 2006 at 10:17 am #22235DARABMember
What is indizis?
-
September 13, 2006 at 12:18 pm #22236peterlaursenParticipant
= Indexes
Do you import data into an existing table or do you crete teh table with the import?
-
-
AuthorPosts
- You must be logged in to reply to this topic.