My Oracle Support Banner

Qcache_hits Is Zero Even Though Query Cache Is Enabled (Doc ID 1566944.1)

Last updated on FEBRUARY 08, 2019

Applies to:

MySQL Server - Version 5.5 to 5.7 [Release 5.5 to 5.7]
Information in this document applies to any platform.

Symptoms

Even though the Query Cache is enabled, after any InnoDB Transaction, the Qcache_hits counter does not increase.

To check the Qcache_hits, run:

mysql> SHOW STATUS LIKE "Qcache_hits";

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
 Workarounds
 Workaround 1: Disable query cache
 Workaround 2: Manually COMMIT (AUTOCOMMIT=OFF)
 Workaround 2.1: Use COMMIT AND CHAIN instead of COMMIT
  Workaround 2.2: Use START TRANSACTION or BEGIN explicitly after COMMIT
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.