Invalidating query cache

I'm discounting #38551 as this happened more than once since after turning the query cache off.Unfortunately the thread finally ended so I can't checkout whether #59899 is related or not.

The entity caching is useful when you plan on changing those entities you’re querying.

If you only need projections/views for rendering a table or something similar, then you are better off using a native query instead and take advantage of database indexing and proper buffer pool tuning.

id=38551 In short, in all My SQL versions before 5.5 , the query cache mutex is acquired even if query_cache_size=0 and query_cache_type=OFF : always!

That is, even if the query cache is not enabled, the mutex (slow, by nature) to access the (not existing) query cache is acquired for every binlog event.

Before it died the query had been going for a very long time, the last time I did a process list showed.

7929352 | system user | | NULL | Connect | 65039 | invalidating query cache entries (table) Please let me know if I can be any more help.

Rows: ~49,917,839 Inno DB latin1_swedish_ci Size: 28.7 Gi B I've now yet been able to repeat with 100% accuracy.

Any help as to how best to test my theory would be greatly appreciated.

Suggested fix: I've switched to statement based replication now to see if that resolves the issue.

Tags: , ,