Home » Categories » Multiple Categories

MySQL Performance Tuning

There are a couple of things that can be done to ensure that your MySQL database is running as fast as it can. Besides making sure that your server is in good shape and that it has the resources necessary for supplying data to your web site/server, you can fine tune it's performance a little by reviewing the following items.

Customizing Antivirus Scanning Rules

MySQL maintains the database data in a data folder It is possible that your antivirus software is scanning the data folders or the temp folders and slowing down the data transfer for the database. To make sure this isn't a problem you must first determine where your data and temp folders are located. MySQl often creates temporary tables to handle more complicated queries. These temp tables are normally created in the Windows temp folder by default. But to be sure you need to look through the "my.ini" file to determine where these folders are located.

The "my.ini" file is usually located under the main installation file for MySQL. Typically "c:\MySQL5\". For older version of MySQL it could also be located in the "system" folder or on the root drive. This is also the order that MySQL looks for the "my.ini" file so try to locate the first "my.ini" file you can find in that order (Install Path first, System path next then the Root path).

Open the "my.ini" file in Notepad or some other simple text editor. Now locate the "datadir=" value. This is the primary storage location path for the database files. Remember this path for later.

Now locate the "tmpdir=" value. It may not exist. If it doesn't then your system is using one of the Windows temp folders. You can add it under the "datadir" value by adding the following line:

tmpdir="C:/MySQL5/Data" 

You can add it anywhere, but it would make sense to add it to the same location as your database folders so that you need only specify a single directory when setting up the antivirus settings to bypass this folder.

Now, using these 2 directories, edit your antivirus program to not include these folders in the normal real-time scan. This will cause your antivirus software to stop scanning these directories in real-time and should speed up the data transfer to your web site/server.

Ensuring database default consistancy

The other item in the 'my.ini" file that is commonly configured improperly is the default temp table format. This is also found in the "my.ini" file that was mentioned above.

Locate the "default-storage-engine=" value in the "my.ini" file. This should be set to:

default-storage-engine=MYISAM

It is common for it to be set to another value. This causes a slow temporary table creation because the format is different thatn the normal tabels that are created with our applications. Changing this value to be consistant should have a significant impact on performance.

3.75 (4)
Article Rating (4 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Comments Comments
There are no comments for this article. Be the first to post a comment.
Related Articles
Why do I get a warning message, about removing my event’s attendees information, when I try to edit a recurring event
Viewed 4819 times since Thu, Oct 27, 2011
Data Migration from Room Reserve to Spaces
Viewed 1828 times since Tue, Jan 27, 2015
Room Reserve - Patron Records
Viewed 2312 times since Wed, Sep 28, 2011
Summer Reader - Database Maintenance
Viewed 7597 times since Wed, Sep 28, 2011
How to add a logo or website header to my calendar page
Viewed 22640 times since Tue, Sep 27, 2011
How To Setup Widgets for Summer Reader 2013
Viewed 20775 times since Tue, Apr 9, 2013
Summer Reader Language/Text Troubleshooting
Viewed 2811 times since Wed, Jan 23, 2013
How do I generate emails for Room Reservation changes
Viewed 2260 times since Thu, Oct 6, 2011
Tiered Prize Messages Setup for Prizes Won for Each Level
Viewed 3360 times since Mon, Oct 17, 2011
Server Architecture and ILS Authentication in Evanced Applications
Viewed 845 times since Wed, Dec 2, 2015