Do you have a question? Post it now! No Registration Necessary. Now with pictures!
April 20, 2005, 9:24 pm
rate this thread
"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
> 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 http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/mySQL-sql-qurey_cache-ftopict202517.html
Visit Topic URL to contact author (reg. req'd). Report abuse:
- » How to have a auto increment field with default value of 1000
- — Next thread in » MySQL Database Forum
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum