Improving MySQL database performance!
- Category : Web Hosting
- Posted on : May 17, 2015
- Views : 3,183
- By : Marcus J.
Most of the shared hosting users use different content management system for their websites. There are different types of content management systems. These content management systems use mysql database most of the time. A CMS can have degraded performance when the user’s database gets fragmented. Mysql Database fragmentation appears when you make lots of changes on your database cause lots of writes and updates. Periodically, these changes cause memory fragmentation on the database, mostly MyISAM storage engine performs tremendous slow on a fragmented condition! This tutorial should have the advises for shared hosting users, how often they should de-fragment their databases and how!
CMS like forum has more fragmentation than a blog. Most of the cases the log tables are seriously fragmented as they are periodically updates for very small number of changes. But nevertheless, mysql database of a blog can get fragmented as well when you periodically updates the posts and receives lots of comments. Age of your database matters a fact of fragmentation. A rule of thumb I have seen people follow, they de-fragment their database at least once a month. If you are running a pretty busy forum and seeing performance of your database is degrading, you should try de-fragmenting the database first to see if that improves the performance or not. In few cases, I have seen, performance improves over 60% after the de-fragmentation.
Now lets talk about how can you defragment your mysql database tables. Mysql provides a build in command called “Optimize” to defragment a database table. The easiest way to optimize a database is to visit Cpanel >> Mysql Databases >> Use the Optimize Database option from your database list.
You can also optimize all the tables of a database using phpmyadmin. Visit phpmyadmin from your cpanel >> Select the database, Check all the tables and issue the command “Optimize” from the dropdown. This would defragment all of the tables for you.
You should periodically run optimize command if you feel your database performance is important and the write/read performance on your database is degrading. On HostSEO, we run MySQL check on all the databases of MyISAM storage engine once in 2 months period to make sure the performance doesn’t degrade if you are not de-fragmenting your databases regularly.
If a table is crashed then you should try to repair it (Repair is another tool given by Mysql similar to Optimize to fix corrupted tables), if it is not working, then you should immediately mail at our support to get your table restored from our backup garage.
Categories
- cPanel Question 47
- cPanel Software Management 29
- cPanel Tutorials 13
- Development 29
- Domain 13
- General 19
- Linux Helpline (Easy Guide) 156
- Marketing 47
- MySQL Question 13
- News 2
- PHP Configuration 14
- SEO 4
- SEO 42
- Server Administration 84
- SSL Installation 54
- Tips and Tricks 24
- VPS 3
- Web Hosting 44
- Website Security 22
- WHM questions 13
- WordPress 148
Subscribe Now
10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!Archive Calendar
Sat | Sun | Mon | Tue | Wed | Thu | Fri |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Recent Articles
-
Posted on : Sep 17
-
Posted on : Sep 10
-
Posted on : Aug 04
-
Posted on : Apr 01
Tags
- ts
- myisam
- vpn
- sql
- process
- kill
- tweak
- server load
- attack
- ddos mitigation
- Knowledge
- layer 7
- ddos
- webmail
- DMARC
- Development
- nginx
- seo vpn
- Hosting Security
- wireguard
- innodb
- exim
- smtp relay
- smtp
- VPS Hosting
- cpulimit
- Plesk
- Comparison
- cpu
- encryption
- WHM
- xampp
- sysstat
- optimize
- cheap vpn
- php-fpm
- mariadb
- apache
- Small Business
- Error
- Networking
- VPS
- SSD Hosting
- Link Building
- centos
- DNS
- optimization
- ubuntu