Strange MySQL behaviour
Hello guys,
I have a strange mysql problem. I really dont have any idea about how to solve the issue. Oke here it is: I have a text collection that is stored in mysql database. I have written an application (in java) that extracts words and writes the same database but in different table. There are ~2000 texts in my database. After this process i got ~800000 words and this operation takes like 10 min on my laptop. But when i deploy the same database and application to my desktop computer, this process takes like 2 days. :rolleyes: This application uses a single thread to write the words to database. The algorithm is simple, i fetch the text and extract the words and in a for loop i sent insert queries to db. My laptop has the following configuration: Code:
Lenovo SL 500 My Desktop: Code:
AMD 6400+ X2 3.2 Ghz Another Computer: Code:
Intel QuadCore CPU 2.4 Ghz In Each OS same version mysql, JDK kit and JDBC drivers are installed. I have also used the same configuration file in each mysql. And I got the configuration file from my laptop. In ubuntu the result is also same. takes two days... :cry: |
Come on guys, need a solution :)
|
the only thing that comes to my mind is,
do you do a commit after each insert, or you do it in the last one?, Have you tried creating a .sql file with all the inserts and doing it in at once? I dont really know what could be the reason but I would try this two things to see if the behaviour is the same. |
Thanks for your opinion, but the thing is the code is same in each system, the mysql version is also same, mysql configurations are same, jdbc driver is same, same jdk installed in each system.. only operating system is different but on my desktop computer there is also 64 bit vista installed. nothing changed.
is my laptop blessed or what? Did lenovo put some special hardware to my computer? If i had the same laptop, i would give a try :) Actually, creating an SQL file came to my mind. But, you know i am trying to figure out what is the reason behind this. Should i submit this as a bug to mysql? :D or lenovo? |
All times are GMT -5. The time now is 08:29 PM. |