When to use SQL_NO_CACHE

后端 未结 4 1885
终归单人心
终归单人心 2020-12-13 05:20

I am in the process of going over my queries, and I have been reading articles about how you should use SQL_NO_CACHE in SELECT queries. This has co

4条回答
  •  甜味超标
    2020-12-13 05:55

    The only time I used it was when profiling queries (EXPLAIN extended...).

    When running a query several times (a very import step to "warm up" the server), it will be cached therefore the profiler will output wrong results.

    Depending of the situation I also use:

    SET SESSION query_cache_type = OFF

提交回复
热议问题