SQL_NO_CACHE does not work

前端 未结 4 711
情话喂你
情话喂你 2020-12-08 02:55

The first time I run this sql, needs 39 seconds,when I run again and increase SQL_NO_CACHE,does not seem to take effect:

mysql> select count(*) from `deal         


        
4条回答
  •  眼角桃花
    2020-12-08 03:18

    The first query should use SQL_NO_CACHE to tell MySQL not to put the result into the cache. The second query uses the cache and the tells MySQL not to cache the result of that query, which does nothing.

    tl;dr - Reverse your queries.

提交回复
热议问题