… cache which use that table, will be invalidated. Remember the Query Cache caches the result set packets, its not caching query execution plans like SQL Server does. So no, the Query cache will not be… your big volatile table, and add SQL_NO_CACHE to them. This means mysql wont bother wasting time caching the results, only for them…
Comment: Should we give a MySQL Query Cache a second chance ?
Another interesting approach would be to automatically SQL_NO_CACHE queries which return highly efficient execution plans from the optimizer. … should we bother caching that? It so fast anyway, and putting it in query cache is just swelling it for no reason, resulting in TONS of invalidation locks. Yes yes, I know you can add SQL_NO_CACHE…
Comment: Should we give a MySQL Query Cache a second chance ?
Another interesting approach would be to automatically SQL_NO_CACHE queries which return highly efficient execution plans from the optimizer. … should we bother caching that? It so fast anyway, and putting it in query cache is just swelling it for no reason, resulting in TONS of invalidation locks. Yes yes, I know you can add SQL_NO_CACHE…
Post: Knowing what pt-online-schema-change will do
… `score` <= ?) ) /*pt-online-schema-change 10451 copy nibble*/ SELECT /*!40001 SQL_NO_CACHE */ `guest_country`, `guest_language`, `score` FROM `test`.`t` FORCE INDEX…_language`, `guest_country`, `score` LIMIT ?, 2 /*next chunk boundary*/ The SQL statements will vary highly depending on the table, the number…
Post: A micro-benchmark of stored routines in MySQL
… here, your comments welcome — is to see how fast the SQL procedure code is at doing basically the same thing the… the World sample database and cooked up this query: select sql_no_cache sum(ci.Population) from City as ci where CountryCode in… ; Now the query can be rewritten as this: mysql> select sql_no_cache sum(ci.Population) from City as ci where speaks_english…
Post: How expensive is a WHERE clause in MySQL?
…’s see how long a table scan with no WHERE clause takes: mysql> select sql_no_cache count(*) from t; +———-+ | count(*) | +———-+ | 8388608 | +———-+ 1 row… t where a = current_date; (Pop quiz: do I need SQL_NO_CACHE on this query?) The average execution time for this query…
Post: Using UNION to implement loose index scan in MySQL
… see how query times differ in these cases: mysql> SELECT sql_no_cache name FROM people WHERE age=19 AND zip IN (12345… | +———————————-+ | 888ba838661aff00bbbce114a2a22423 | +———————————-+ 1 row in set (0.06 sec) mysql> SELECT SQL_NO_CACHE name FROM people WHERE age BETWEEN 18 AND 22 AND…
Comment: Write contentions on the query cache
>The best solution was simply to turn off the query cache Alternatively you could have use SQL_NO_CACHE, would that help? Because turning the query_cache globally might effect other sqls? or perhaps disable query cache in the session?
Post: Are larger buffers always better ?
… sized “just right” – working with smaller data structures would improve cache locality, will make it easier for OS to manage memory…`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 select sql_no_cache count(*) from t1 where c in (select sql_big_result count(*) from t1 where d… quite sure there are others. For example too large table_cache may slow your opens and closes down, too large query…
Post: Optimizing repeated subexpressions in MySQL
… a little benchmark. The query looks something like this: select sql_no_cache pow(sum(rental_id), 1), pow(sum(rental_id), 2… is an alternative query that returns the same result: select sql_no_cache pow(@sum := (select sum(rental_id) from sakila.rental), 1…

