cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2x MYSQL Settings

Magento 2x MYSQL Settings

Are there any expected MYSQL settings or highly recommended to change to deal with slow performance or increase database performance?

 

We see a lot of full table scans and tables without indexes and wondering if this is expected from Magento mysql database.

1 REPLY 1

Re: Magento 2x MYSQL Settings

Yes, there are some recommended MySQL settings for Magento 2 to improve performance. Here are a few suggestions:

 

Increase the innodb_buffer_pool_size variable to at least 1/2 of the available RAM on the server. This setting controls the amount of memory that InnoDB uses for caching data and indexes.

 

Increase the innodb_log_file_size variable to a value that is appropriate for the workload. This setting controls the size of the InnoDB redo log, which is used for crash recovery and other operations.

 

Enable the slow_query_log and log_queries_not_using_indexes options to identify slow queries that may benefit from index optimization.

 

Optimize your database tables to improve performance. This can be done using the OPTIMIZE TABLE command.

 

Use a caching system, such as Varnish or Redis, to reduce the load on the database and improve performance.

 

It's also a good idea to periodically review your MySQL configuration and optimize it based on your specific workload and performance requirements.