MOCKSTACKS
EN
Questions And Answers

More Tutorials









MYSQL Configuration and tuning

InnoDB performance


There are hundreds of settings that can be placed in my.cnf. For the 'lite' user of MySQL, they won't matter as much.

Once your database becomes non-trivial, it is advisable to set the following parameters:

innodb_buffer_pool_size

This should be set to about 70% of available RAM (if you have at least 4GB of RAM; a smaller percentage if you have a tiny VM or antique machine). The setting controls the amount of cache used by the InnoDB ENGINE. Hence, it is very important for performance of InnoDB.

Parameter to allow huge data to insert


If you need to store images or videos in the column then we need to change the value as needed by your application

max_allowed_packet = 10M

M is Mb, G in Gb, K in Kb

Increase the string limit for group_concat


group_concat is used to concatenate non-null values in a group. The maximum length of the resulting string can be set using the group_concat_max_len option:

SET [GLOBAL | SESSION] group_concat_max_len = val;

Setting the GLOBAL variable will ensure a permanent change, whereas setting the SESSION variable will set the value for the current session.


Conclusion

In this page (written and validated by ) you learned about MYSQL Configuration and tuning . What's Next? If you are interested in completing MYSQL tutorial, your next topic will be learning about: MYSQL Events.



Incorrect info or code snippet? We take very seriously the accuracy of the information provided on our website. We also make sure to test all snippets and examples provided for each section. If you find any incorrect information, please send us an email about the issue: mockstacks@gmail.com.


Share On:


Mockstacks was launched to help beginners learn programming languages; the site is optimized with no Ads as, Ads might slow down the performance. We also don't track any personal information; we also don't collect any kind of data unless the user provided us a corrected information. Almost all examples have been tested. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. By using Mockstacks.com, you agree to have read and accepted our terms of use, cookies and privacy policy.