Need advice in mysql performance tunning

Reply

Join Date: Apr 2009
Posts: 5
Reputation: bas_brain is an unknown quantity at this point 
Solved Threads: 0
bas_brain bas_brain is offline Offline
Newbie Poster

Need advice in mysql performance tunning

 
0
  #1
Apr 27th, 2009
hi, i am a newbie in mysql and i have some questions about performance tuning.

1-) in a system where you have to store information about a user, such as, user_name, id, last_log, is it better to store all the information needed in one table (lets assume 30 fields in a table) or split then in more tables (3 tables with 10 fields each).

2-) on my.conf, which are the values that is related with performance and how to change then (there is a formula, or something)?

3-) storage engines: Myisam or Innodb

4-) Queries: select * from db. Is this query good to get all users registered or there is a disadvantage in performance.


Any advice you may want to give will be welcome.

thanks for helping
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 42
Reputation: hericles is an unknown quantity at this point 
Solved Threads: 4
hericles hericles is offline Offline
Light Poster

Re: Need advice in mysql performance tunning

 
0
  #2
Apr 27th, 2009
Hi bas_brain,
I can't help with parts 2 and 3 of your question.
For 1) you can improve the performance by structuring the tables around the data you will be requesting the most. E.g. if there are several columns you will always be selecting and others than you'll use rarely you can split the tables along those lines.
Also, constructing the tables to avoid redundant data is a good idea (have a look and 2nd and 3rd normal forms on the net).

For 4) select * takes everything form the table. This obviously takes longer than just selecting what you actually need.

Hope that helps,
Hericles
MCP MCAD
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,072
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: Need advice in mysql performance tunning

 
0
  #3
Apr 29th, 2009
As i know , i got this information for your 3 rd question:

you need to look at what makes each engine unique:

myisam -- fast for reading and inserting, table level lock which makes
it not suitable for transactions
innodb -- fast for updating and most suitable for transactions because
it uses row level locks

you certainly can use a combination of these 2 types of engines in your
database.

with innodb, you'll have cascading deletes/updates; however with myisam,
you'll have to do it yourself in the code or in stored procedures. so
maybe some of your tables should be innodb while others should be myisam.

However, I noticed that InnoDB tables get a bit slower than MyISAM
tables during bulk-inserts ,especially of TEXT/Blobs and Varchars. It
is all relative. It depends what fields you want to store, how many
writes / reads and so on.

Refer these links for more information :
http://www.mysqlperformanceblog.com/...sam-to-innodb/
http://binnyva.blogspot.com/2006/08/...nnodb-and.html
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC