Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

caching - MySQL 8 Warning: SQL_NO_CACHE is deprecated

When issuing a statement to MySQL8 server:

SELECT SQL_NO_CACHE *
FROM <table-name>;

I get this warning:

Warning, 1681, 'SQL_NO_CACHE' is deprecated and will be removed in a future release.

I would like to ask if there is any successor of the SQL_NO_CACHE that works or is planned to work with MySQL 8.x?

Does SQL_NO_CACHE actually work with MySQL 8.x or it is omitted by the server?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

https://dev.mysql.com/worklog/task/?id=10837 says:

Since 8.0 still has (i.e. silently ignores) the SQL_NO_CACHE syntax and always returns false on the have_query_cache variable, maintain deprecation warnings for both like we do in 5.7 for a while.

more readings on this subject: https://mysqlserverteam.com/mysql-8-0-retiring-support-for-the-query-cache/

"Although MySQL Query Cache was meant to improve performance, it has serious scalability issues and it can easily become a severe bottleneck."

and

"The query cache has been disabled-by-default since MySQL 5.6 (2013)"


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...