Innodb Buffer Pool vs Query Cache

Innodb Buffer Pool vs Query Cache

am 12.11.2009 10:00:28 von Aveek Misra

I am using the innodb storage engine for a table that is used for a lot
of SELECT's on columns that are defined as indexes. I have not enabled
the query cache as of now since the innodb buffer pool already caches
data and index information for InnoDB tables. So my question is - is
the query cache used primarily for MyISAM tables or is it also useful
for InnoDB tables (considering that the InnoDB has a buffer pool in
place)? If I do enable the query cache, is there an additional overhead
of maintaining two buffers that essentially contain the same data?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Innodb Buffer Pool vs Query Cache

am 12.11.2009 12:43:06 von Johan De Meersman

--0015177404c6f7cb3004782b0b67
Content-Type: text/plain; charset=ISO-8859-1

The query cache lays at the server level, above individual engine
implementations, and thus affects all of them.

It (case-sensitively!) compares the current query with the queries in the
query cache, and if there's an EXACT match (including all parameter
positions, wheres, and whatnot), it returns the data immediately, thus
saving you the parse and execute steps. That's a lot of benefit, given that
you run the same identical query lots of times.

There will of course be some extra overhead when you enable it, but unless
you have some sort of data mining application that only executes every
individual query once and only once, you'll reap the benefits of it.


On Thu, Nov 12, 2009 at 10:00 AM, Aveek Misra wrote:

> I am using the innodb storage engine for a table that is used for a lot of
> SELECT's on columns that are defined as indexes. I have not enabled the
> query cache as of now since the innodb buffer pool already caches data and
> index information for InnoDB tables. So my question is - is the query cache
> used primarily for MyISAM tables or is it also useful for InnoDB tables
> (considering that the InnoDB has a buffer pool in place)? If I do enable the
> query cache, is there an additional overhead of maintaining two buffers that
> essentially contain the same data?
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=vegivamp@tuxera.be
>
>

--0015177404c6f7cb3004782b0b67--