Solved

Fine tuning MySQL for better performance with Java Application

Posted on 2008-09-30
6
286 Views
Last Modified: 2010-05-18
Hi
previously i asked a question regarding having some issues with connections and have got some fairly reasonable answers

Yesterday i have seen these links regarding 'php' website connected to MySQL and optimising it so as to get better performance...the links for reference are
http://www-css.fnal.gov/dsg/external/freeware/mysqlTuning.html
http://www.getafreelancer.com/projects/sumitp83_302783.html

My application is a Java application and use the MySql and i wish if someone can help regarding similar topics like fine tuning MySQL to work perfectly(or somewhat better) using Java,Tomcat.
you can advice me on persistency,pooling,connection problems,stability,robustness ,faster processing tips etc...

Please provide some solid answers and as some the answers are too vague to actual implement and still requires me to do the homework.thanks
0
Comment
Question by:darien_software
  • 3
6 Comments
 
LVL 24

Expert Comment

by:Tomas Helgi Johannsson
Comment Utility
      Hi!

I suggest you take a look at the Optimization part of the Manual
http://dev.mysql.com/doc/refman/5.0/en/optimization.html

there you can find all the necessary information to tune your MySQL db to your app.

Regards,
   Tomas Helgi
0
 
LVL 24

Expert Comment

by:Tomas Helgi Johannsson
Comment Utility
Also what you can do is do an EXPLAIN on your queries ( http://dev.mysql.com/doc/refman/5.0/en/explain.html )
or the log ( http://dev.mysql.com/doc/refman/5.0/en/mysql-explain-log.html ).
If you find in the results that queries are doing TABLESCAN then you should add an index on the
matching columns in the query's where clause to change it into INDEXSCAN for optimal performance on the table.

Regards,
   Tomas Helgi
0
 

Author Comment

by:darien_software
Comment Utility
hi  tomas
thanks for the details i will look into the material u provided
well i want some details like
what are the parameters have to be changed,a prose sort of to identify the factors which help in fine tuning mysql.
so that then it will be useful to get in details as mentioned in ur link
so if anybody else has any answers please let me know
thanks
0
 
LVL 24

Accepted Solution

by:
Tomas Helgi Johannsson earned 250 total points
Comment Utility

How to tune a database depends on how the application works i.e connects to
and manipulate the data in the db.
You have to look into the queries and see how they access the data and
configure the bufferpools, create neccesary indexes etc.
Ask your self:
How are the tables organized?
How are the relationship between the tables ?
Do you use MYISAM or InnoDB ?
Do you have massive inserts (batch), updates or deletes ?
Tuning the database to maximize the performance depends on how you
answer those questions as well as other questions related to disk and locking issues.


Regards,
   Tomas Helig

0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now