Title: Optimize SQL
Last modified: August 24, 2016

---

# Optimize SQL

 *  [vibhu000](https://wordpress.org/support/users/vibhu000/)
 * (@vibhu000)
 * [11 years ago](https://wordpress.org/support/topic/optimize-sql-1/)
 * Hi there,
 * I have a website where the server response time is ultra slow. There’s no problem
   with my hosting provider as they are one of the premium hosting provider and 
   I pay 55 USD per month for its VPS hosting.
 * However, the server response time is 4-5 seconds. I contacted them regarding 
   this issue, and their reply is below. They say they don’t provide any free service
   to fix the issue but they can tell what’s the issue.
 * Reply:
 * _Throughout the course of analyzing your site and server, we were able to identify
   the following potential bottlenecks in your configurations._
 * 1.
    + MySQL Server Configuration Severity: Moderate
 * Issue: The current settings for MySQL server variables appear to be inappropriate
   for the needs of your applications. Properly optimizing MySQL server variables
   will not only improve the performance of database driven applications, but can
   also reduce the amount of CPU required by MySQL, which helps to maintain a lower
   load average on the server.
 * Solution: MySQL server variables should be appropriately adjusted in your ‘/etc/
   my.cnf’ file. The goal is to increase/decrease MySQL buffers as required by your
   applications, without causing a general memory overage on the server. Although
   tuning MySQL can be difficult, the following articles will guide you through 
   the process of MySQL optimization.
 * [http://www.mysql.com/why-mysql/performance/index.html](http://www.mysql.com/why-mysql/performance/index.html)
 * We would personally recommend modification of the following variables:
 * query_cache_size
    tmp_table_size max_heap_table_size thread_cache_size
 * Could you please tell me how do I do this?
 * Thank You,
    Vaibhav

Viewing 1 replies (of 1 total)

 *  [linux4me2](https://wordpress.org/support/users/linux4me2/)
 * (@linux4me2)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/optimize-sql-1/#post-6182063)
 * The /etc/my.cnf file is a simple text file on your VPS that you can edit. Do 
   a text search for the variable you want to change. However, before you do that,
   I would optimize WordPress first, which will decrease the load on the server 
   and MySQL and may make altering your MySQL server variables moot.
 * Have a look at the Codex article on [optimizing WordPress](http://codex.wordpress.org/WordPress_Optimization).
 * You may only need to add a caching plugin like WP Super Cache configured with
   mod_rewrite and switch wp-cron to an actual cron job to make a big difference.

Viewing 1 replies (of 1 total)

The topic ‘Optimize SQL’ is closed to new replies.

## Tags

 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [server response time](https://wordpress.org/support/topic-tag/server-response-time/)
 * [website speed](https://wordpress.org/support/topic-tag/website-speed/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [linux4me2](https://wordpress.org/support/users/linux4me2/)
 * Last activity: [10 years, 12 months ago](https://wordpress.org/support/topic/optimize-sql-1/#post-6182063)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
