How to optimize MySQL Database tables

We all webmasters use MySQL, MsSQL or Postgre to manage our sites. You cannot even imagine to run a site without any database(DB) software. All sites including Google Yahoo or Bing uses some sort of database.

All blog running on WordPress even ours uses MySQL at its backend. If you have a small website with small DB size then probably you will not face any problem but what’s about big blogs like Techcrunch which gets thousands of visitors everyday with thousands of article posts. In this case every page will establish a direct connection with the database and fetch many queries together.

So here comes the need of Optimized DB. Optimized one can play a major role in decreasing server load on running CPU processes and overall overheads.

If you are using a shared hosting then this way you can efficiently manage your account.

So I will use PHPmyadmin(its free and popular) as my DBMS to analyze, check and optimize tables.

1) First of all Login to your PHPmyadmin DB management area.

2) Now from the left sidebar select the desired database.

3) Now Check All the table entries and click ‘Check Table’ option from the drop down menu and it will run a query.

option menu

4) After this go back to that database again and select all the table entries. Now select ‘Optimize Table’ option from the menu.

5) That’s all. The menu has many different options like Repair, Drop, Empty and so on. So use them carefully. Never select Drop or Empty option. Else it will ruin your DB.

If you follow the above step for a WordPress blog then it might be possible that your Post pages may not work properly or show 404 error. To solve it just go to your WordPress Admin Panel and Click on ‘Permalinks’ under Settings menu and just click on Save Changes button. Don’t make any changes! It will start working fine again.

**Remember to take your DB backup before using any of the above methods. We will not be responsible for any loss.

You might like:

Tags:

8 Responses to “How to optimize MySQL Database tables”

  1. Techno-Pulse says:

    DB optimization is a big challenge in any software development project. It determines the speed & scalability of the site.

  2. blinkky says:

    Make sure to backup first =)

  3. Nice tips but my wordpress database backup optimize automatically each month and thanks to my backup plugin.

  4. Think if we mistakenly drop the table…lol…..we will be ruined…so better take a backup before you do this optimization stuffs

  5. Nice tutorial :) i use backup plugin.

  6. Gojeg says:

    A simple trick, but very useful. :D

  7. Shekhar sahu says:

    This is new to me…

  8. I always repair and optimize my tables to keep my blog fresh and fast :D Cool tip mate :D

Leave a Reply

 
About Author
frih-photo

I am unprofessional blogger, blogging to share my knowledge about technology, recent events and news.

Newsletter Sign Up

FaceBook

About Us

TechBusy offers tech based tips for better and enhanced web experience.

Email: info@techbusy.org

Mobile Friendly

TechBusy is mobile friendly now! Access this blog from any web enabled mobile phone to know about tech based tips and updates.

Copyright 2011. TechBusy.Org. All Rights Reserved.