MySQL Forums
Forum List  »  Memory Storage Engine

Re: engine=memory versus query_cache
Posted by: Bodo Fritsche
Date: March 31, 2006 02:27AM

Ingo Strüwing wrote:
> Hi,
> I might be misunderstanding your question(s).
> Please ask again in this case.
> I agree that a table that does not need to be
> stored on disk is a candidate for a memory table.
> Regardless of the type of statements executed on
> it. But please keep in mind that the size of a
> memory table is much more limited than a MyISAM
> table.

This table is very small (1.600 bytes), but updated nearly every few seconds.

> I also agree that a table with much more selects
> than changes is a candidate for the query cache.
> But the query cache is active by default. You just
> may want to enlarge it if the hit rate seems
> insufficient for you.

The documentation and my runtime information says that query_cache_size is defaulted by "0" meaning that although query_cache_type ="ON" there is no query_caching until query_cache_size and query_cache_limit is set.

> There is just one query cache. But you can turn it
> on and off for every connection individually if
> you like.
> All SELECTs for all table types are cached unless
> individualy disabled per connection or even per

Am I right?: This means that the above mentioned memory-table will put a relatively high activity (in terms of deleting the table from the query_cache) on the query_cache because its fields will be updated so often.

I would have expected that mySQL recognizes that if a table is memory, it excludes it from query_caching.

> If you change to a memory table, its SELECTs will
> also be cached. But if these are relatively seldom
> for your table, it should be no problem.
> You may already have read this, but just in case:
> .html
> Regards

Thanks Ingo!


Edited 6 time(s). Last edit at 03/31/2006 02:32AM by Bodo Fritsche.

Options: ReplyQuote

Written By
March 30, 2006 11:46AM
Re: engine=memory versus query_cache
March 31, 2006 02:27AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.