Query profiling shows "Waiting for query cache lock" but query_cache_size is 0
The message means that you are trying to acquire a Query Cache Mutex even though the query_cache_size is 0 (Note that akuzminsky mentioned that the MySQL for Oracle still allows this) You will need to set query_cache_type to 0 as well because as the MySQL Documentation says:


  If the server is started with query_cache_type set to 0, it does not acquire the query cache mutex at all, which means that the query cache cannot be enabled at runtime and there is reduced overhead in query execution.


In MySQL 5.6, query_cache_type is 0 by default. It's 1 for MySQL 5.0, 5.1, and 5.5

Regardless of the MySQL version, make sure my.cnf has these

[mysqld]
query_cache_size = 0
query_cache_type = 0


You do not need to restart mysql. Just login to mysql and run the following:

mysql&gt; SET GLOBAL query_cache_size = 0;
mysql&gt; SET GLOBAL query_cache_type = 0;


Give it a Try !!!