- Joined
- Jul 27, 2016
- Messages
- 184
- Points
- 18
I heard that there is a way to optimize/enable MySQL Query cache to boost website loading speed.
It is possible and how to do that?
It is possible and how to do that?
mysql -u root –p
SET GLOBAL query_cache_size = xxxx;
What caching solution would you recommend for the OP?Be careful with the cache size. The query_cache_size define the size of a unique query. Not the size of all the queries.
And the best way to boost a website loading speed is to use a caching system. Because it will reduce the number of queries. MySQL system will never be fast enough even with an huge queries cache.
If you want to Optimize MySQL Query Cache then applying these steps here and its simple.I heard that there is a way to optimize/enable MySQL Query cache to boost website loading speed.
It is possible and how to do that?
# mysql -u root -p
Check current status of Mysql cacheEnter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 333
Server version: 5.5.50-38.0 Percona Server (GPL), Release 38.0, Revision b05b24c
Copyright (c) 2009-2016 Percona LLC and/or its affiliates
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
show variables like 'query_cache_%';
How to edit MySql cachemysql> show variables like 'query_cache_%';
+------------------------------+---------+
| Variable_name | Value |
+------------------------------+---------+
| query_cache_limit | 1048576 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 0 |
| query_cache_strip_comments | OFF |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
+------------------------------+---------+
6 rows in set (0.00 sec)
mysql> Ctrl-C -- exit!
nano /etc/mysql/my.cnf
query_cache_limit = 3M
query_cache_size = 128M
service mysql restart
mysql> show status like 'Qc%';
Not sure if you've done this already but it's a common thing that comes up in web development: change your queries to run on InnoDB instead of MyISAM. This will also give you a performance boost.I heard that there is a way to optimize/enable MySQL Query cache to boost website loading speed.
It is possible and how to do that?
ForumWeb.Hosting is a web hosting forum where you’ll find in-depth discussions and resources to help you find the best hosting providers for your websites or how to manage your hosting whether you are new or experienced. You’ll find it all here. With topics ranging from web hosting, internet marketing, search engine optimization, social networking, make money online, affiliate marketing as well as hands-on technical support for web design, programming and more. We are a growing community of like-minded people that is keen to help and support each other with ambitions and online endeavors. Learn and grow, make friends and contacts for life.
The world's smartest hosting providers come here to discuss & share what's trending in the web hosting world!