Re: sql qurey_cache

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

"Alexandre Jaquet" wrote:
 > Hi when I read the documentation about how the query it's
 > doesn't clear
 > my mind about how it can optimize db quering.
 > When I include a SQL_CACHE clause in a query, does the datas
 > are stored
 > in memory or not ?
 > If for exemple I've a series of queries  :
 > SELECT [fields] FROM [db] WHERE [statement= value1]
 > SELECT [fields] FROM [db] WHERE [statement= value2]
 > SELECT [fields] FROM [db] WHERE [statement= value3]
 > SELECT [fields] FROM [db] WHERE [statement= value4]
 > the only things who change are the statement, any optimisation
 > is
 > possible by adding "SELECT SQL_CACHE" ?
 > In the documentation I read :
 > " Queries are compared before parsing, so the following two
 > queries are
 > regarded as different by the query cache:"
 > In my example does caching by adding SQL_CACHE are done for
 > each queries ?
 > thx for your response

Besides other responses, you may want to think of this:

Letís say you have have done a name/address lookup via mysql and it is
cached.  Now if the table is updated for whatever reason, the cache is
busted (e.g. a new user added).

In such cases, you may want to look at a non-db related cache.  I used
cacheLite.  Works pretty nice, for things that I know donít change
regardless of the tables chaning.

Posted using the interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL:
Visit Topic URL to contact author (reg. req'd).  Report abuse:

Site Timeline