
Are you trying to Optimize Magento Database to improve your website speed?
This guide will help you.
Magento includes several configuration options that you can use to help improve your site's speed and responsiveness.
Ensuring that our e-commerce solution is running fast is one of the most important factors to the sales.
SEO rankings, abandonment rate, and the shopper's overall user experience are also as important as the speed of the website.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to optimize Magento database.
In this context, you will learn how to configure these options in Magento so they are optimized for high performance.
How to Optimize Magento Database ?
The following steps can be used to Optimize Magento database.
1. MySQL table optimization
Through phpMyAdmin, we can perform the command OPTIMIZE TABLE on specific Magento database-tables. When a table is cluttered, this could lead to improvement of performance. This does not only count for the complex EAV-tables, but also for regular MySQL tables frequently in use (for instance, core_config_data).
2. MySQL server tuning
The default MySQL setup is a lot of times sufficient to run a general hosting environment, but not all optimized for Magento. Tuning settings like query_cache_size could dramatically increase performance but is also dangerous because it hugely depends on other variables (number of databases, number of tables per database, number of queries, peak usage).
3. Log cleaning
Magento maintains several tables for logging. These tables log things such as customer accesses and frequently-compared products. Magento has a mechanism for cleaning these logs regularly, but this feature is disabled by default and most customers do not enable it.
4. Query Cache size
Modify the configuration of the MySQL server to take better advantage of the server’s RAM. Most Linux distributions provide a conservative MySQL package out of the box to ensure it will run on a wide array of hardware configurations.
If we have ample RAM (eg, 1gb or more), then we can try tweaking the configuration. An example of my.cnf is below.
However, will have to consult the MySQL documentation for a complete list of configuration directives and recommended settings:
Query Cach: query_cache_size: 64MB, query_cache_limit: 2MB
query_cache_type = 1
query_cache_size = 32M
query_cache_limit=2M
Recommended innodb_buffer_pool_size.
Combined web and db server, 6 GB RAM: 2-3 GB
Dedicated database server, 6GB RAM: 5 GB
Dedicated database server, 12 GB RAM: 10 GB
innodb_thread_concurrency.
2 * [numberofCPUs] + 2
5. Setup Faster Hardware for Server Hosting
This involves using SSD for databases.