?
Solved

Fine tuning MySQL for better performance with Java Application

Posted on 2008-09-30
6
Medium Priority
?
293 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 22612400
      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 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 22612423
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
ID: 22624703
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 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 1000 total points
ID: 22624964

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

765 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