List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:July 30 2002 4:44pm
Subject:Re: question about cached result
View as plain text  
In the last episode (Jul 30), xuefer tinys said:
> i'm using mysql 4.x
> 
> it is said the query result is cached by mysql for next query
> 
> i have a forum, having "post" table post: postid, title, content,
> postdate, clickcount and clickcount is increased when the post is
> viewed
> 
> and a page to search post
> select * from post where title like "%word to match%"
> 
> will this result cached by mysql ?

From the manual:  http://www.mysql.com/doc/Q/u/Query_Cache_How.html

   If a table changes (INSERT, UPDATE, DELETE, TRUNCATE, ALTER or DROP
   TABLE|DATABASE), then all cached queries that used this table
   (possibly through a MRG_MyISAM table!) become invalid and are
   removed from the cache.

If you want searches on title or content to cache, you'll have to move
them to another table.

-- 
	Dan Nelson
	dnelson@stripped
Thread
question about cached resultxuefer tinys30 Jul
  • Re: question about cached resultDan Nelson30 Jul