Bug #65106 | SQL_NO_CACHE doesn't work with BENCHMARK | ||
---|---|---|---|
Submitted: | 25 Apr 2012 21:18 | Modified: | 26 Apr 2012 3:57 |
Reporter: | Radu Murzea | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Parser | Severity: | S2 (Serious) |
Version: | 5.5.16 | OS: | Windows |
Assigned to: | CPU Architecture: | Any |
[25 Apr 2012 21:18]
Radu Murzea
[25 Apr 2012 21:23]
Radu Murzea
I forgot to add something important: This is an important issue because if the cache is used during the BENCHMARK, then the BENCHMARK has no sense and its results are severely affected by the use of the cache. Of course there are multiple caches that affect performance (disk cache, RAID cache, OS cache, InnoDB buffer pool etc.) and that you cannot control with SQL_NO_CACHE, but that doesn't mean it's not important.
[25 Apr 2012 21:27]
Davi Arnaut
It does not work because it makes no sense, query cache is not used for queries that are a subquery of an outer query.
[26 Apr 2012 3:57]
Valeriy Kravchuk
Our manual clearly says about SQL_NO_CACHE: "Also, these options are not permitted in subqueries (including subqueries in the FROM clause), and SELECT statements in unions other than the first SELECT." Check http://dev.mysql.com/doc/refman/5.5/en/select.html.