Re: cmysql

From: Date: Tue, 12 Oct 2004 16:01:48 +0000
Subject: Re: cmysql
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-33803@lists.php.net to get a copy of this message
On Tue, 12 Oct 2004, Alexey Borzov wrote: > > 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). Good points. I haven't ever though about query cache this way. Some observations: > 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. True. > 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. Still if you have adequate amount of memory of which decent amount is allocated to query cache and if your aplication does a lot of complex selects which return small amount of data trashing won't be too big of a problem. Memory is cheap. > 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? Then again, not every site is high-level and the current implementation provided by MySQL is enough for them. My point is, I understand the faults of MySQL query cache. Still there are valid uses for it. Having it in MySQL atleast does not make any harm. And yes, I use other databases than MySQL too ;) -- Mika Tuupola http://www.appelsiini.net/~tuupola/

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