Re: cmysql

From: Date: Tue, 12 Oct 2004 11:20:55 +0000
Subject: Re: cmysql
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-33795@lists.php.net to get a copy of this message
Hi, Mika Tuupola wrote:
Regarding the userland implementation of query cache for MySQL. How does it differ from the query cache natively provided by MySQL?
MySQL's builtin query cache is a bad joke mostly done by fine MySQL folk to look good in benchmarks.
Do you have any pointers to and article or similar which points out why the query cache sucks?
No, I don't have a link to any such article. I can give several points, though (some of them were already raised in the thread). 1) Query still has to travel to the server and the results have to travel back to the client. That may require network traffic if they are on different boxes and this always require starting a new database server thread. Userland cache is better in that regard. 2) To get good results you still have to manually mark queries that need caching and those that are not. If you don't do this, cache will be trashed. No advantages over userland cache. 3) High-level sites do not rely on MySQL's builtin query caching but roll out their own solutions, see memcache for example, developed by livejournal.com. Maybe their programmers have a clue? And of course the benefit of userland cache is that it can be made DB-independent. I know that everyone and his dog (and NASA as well) uses MySQL, but still. One can also consult the archives of PostgreSQL mailing lists where its developers explained their reservations to adding a cache feature directly to the server.

« previous php.pear.dev (#33795) next »