Forums / Developer / performance: mysql 4.x

performance: mysql 4.x

Author Message

Georg Franz

Friday 05 March 2004 5:27:01 am

Hi,

a "small tip" which can speed up the system if you are using mysql 4.x.

The "query cache" is turned off by default.

Turning on the cache boost up the system!

To have a look, if your caching is turned on / off:
mysql> SHOW VARIABLES LIKE '%query_cache%';
+-------------------+---------+
| Variable_name | Value |
+-------------------+---------+
| have_query_cache | YES |
| query_cache_limit | 1048576 |
| query_cache_size | 0 |
| query_cache_type | ON |
+-------------------+---------+
4 rows in set (0.06 sec)

If the "query_cache_size" is set to 0 -> the caching is disabled.

Just put this in your my.ini / my.cnf configuration file:

query-cache-type = 1
query-cache-size = 32M

Kind regards,
Emil.

Best wishes,
Georg.

--
http://www.schicksal.com Horoskop website which uses eZ Publish since 2004

Tony Wood

Friday 05 March 2004 5:46:59 am

Nice tip.
Thanks Emil.

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Alex Jones

Friday 05 March 2004 7:04:42 am

Thanks for the tip! I'm running version 3.x, which doesn't have <i>query_cache_size</i>, but does have <i>query buffer size</i>, which I suspect is the same thing. I have a bit of investigating to do...

Out of curiosity, do you recommend shifting to 4.x?

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Björn [email protected]

Friday 05 March 2004 7:28:56 am

good one, but watch your swap. If you swap to much your system will slow down

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/