Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > General
User Name
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!


  Search this Thread
Old 05-18-2009, 01:37 PM   #1
Registered: Mar 2004
Location: TR
Distribution: Ubuntu 9.04 (x64)
Posts: 62

Rep: Reputation: 15
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. 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:

Lenovo SL 500
Dual Core P8600 CPU 2.4 Ghz. 
4 GB of RAM DDR 667
250 GB 5400 RPM disk
GeForce 9300M Video Card
Vista Ultimate 64-bit OS and MySQL is 64 bit also.
Operation takes 10 min in this computer

My Desktop:

AMD 6400+ X2 3.2 Ghz
2 GB of DDR 800 RAM
2 TB HDD 7200 RPM
GeForce 8600 GTS-O Video Card
Windows XP Pro SP3 32 bit MySQL installed. 
Vista Ultimate 64-Bit 64 bit MYSQL installed.
Ubuntu x32_64 64-Bit MySQL installed.
Operation takes like 2 days in this computer in each OS

Another Computer:

Intel QuadCore CPU 2.4 Ghz
4GB of RAM
1 TB 7200 RPM disk
Windows XP Pro 32 bit mysql installed
Operation takes like 2 days in this computer..

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

Last edited by The_eXXe; 05-18-2009 at 01:49 PM.
Old 05-20-2009, 02:00 AM   #2
Registered: Mar 2004
Location: TR
Distribution: Ubuntu 9.04 (x64)
Posts: 62

Original Poster
Rep: Reputation: 15
Come on guys, need a solution
Old 05-20-2009, 03:55 AM   #3
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 14.04
Posts: 434
Blog Entries: 1

Rep: Reputation: 45
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.
Old 05-20-2009, 10:46 AM   #4
Registered: Mar 2004
Location: TR
Distribution: Ubuntu 9.04 (x64)
Posts: 62

Original Poster
Rep: Reputation: 15
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? or lenovo?

Last edited by The_eXXe; 05-20-2009 at 11:08 AM.


database, java, mysql

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
ps -ef strange behaviour ?? lionking_x Linux - Newbie 1 11-28-2007 05:22 PM
MySql + FC4 + cpanel - very strange behaviour ddaas Linux - Networking 4 11-01-2006 03:02 PM
strange behaviour marsques Slackware 11 02-15-2006 06:05 PM
Strange Behaviour! joshuarowley LQ Suggestions & Feedback 1 12-08-2005 03:36 PM
Strange Behaviour mikeyt_3333 Linux - General 4 08-06-2001 03:07 PM > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 06:05 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration