… SELECT INTO OUFILE from this. Using the employees.employees table: mysql [localhost] {msandbox} (employees) > EXPLAIN SELECT * INTO OUTFILE ‘/home/viiin…You will notice the second query without the additional derived
Post: SELECT UNION Results INTO OUTFILE
Comment: Derived Tables and Views Performance
… for derived tables to be materialized. It is design deficiency in MySQL 5.0. Speaking about Views with group by – good question. MySQL is currently able to execute via query merge only…; Query OK, 0 rows affected (0.03 sec) mysql> explain select * from v2 where k=7 limit 5; +—-+————-+————+——-+—————+——+———+——+———+————-+ | id | select_type | table | type…
Post: MySQL Query Cache
… it will not be cached. Table level granularity in invalidation – If table gets modification all queries derived from this table are invalidated at once. Most of them quite likely would not have change their result set but MySQL…
Post: Database problems in MySQL/PHP Applications
… loosing data etc. Read more in my Why MySQL Could be slow with Large Tables article. 5. The n+1 pattern This… is typical error. On other hand in MySQL you might be better of using several queries than doing complicated ones. Of course… are not, and so using IN() list of values derived by previous query. For example you can do: SELECT id FROM users…
Post: Data compression in InnoDB for text and blob fields
… indicated there would be a benefit derived from table compression. With the original InnoDB…MySQL 5.5) you can now leverage table compression by specifying ROW_FORMAT=COMPRESSED. In our case we only wanted MySQL…in queries against this table when the TEXT fields were not part of the query request …
Comment: A common problem when optimizing COUNT()
… … I would imagine that the syntax I showed ( using a derived table) would work on most databases. I’m not sure why… thinking and completely botched describing was that previous to MySQL having subqueries/derived tables being able to use columns that do not appear… is a ‘real database’. As many MySQL users do not want to write correct/sane queries that have GROUP BY means that…
Post: Why you should ignore MySQL's key cache hit ratio
…statistics from which the ratio is derived (but not the ratio itself, which… between the counter events and the query‘s execution time. Alas, that … that’s dedicated to MyISAM tables. Consider your mixture of storage engines …to your IO system’s capabilities. MySQL doesn’t have good instrumentation …
Comment: Derived Tables and Views Performance
… query rewriting, so effectively query becomes same as on base table. Inline views/derived tables however can’t do it they always have to materialize table. Creating view you can also force it to use TEMPTABLE for query execution. See http://dev.mysql.com/doc…
Comment: Database problems in MySQL/PHP Applications
… data etc. Read more in my > Why MySQL Could be slow with Large Tables article. Deciding whether or not to let the… is typical error. On other hand in MySQL you might be > better of using several queries than doing complicated ones. Of > course… are not, and so using IN() list of values derived > by previous query. For example you can do: > SELECT id FROM users…
Post: Caching techinques
… information is updated. This is how MySQL Query Cache works by removing all queries derived from the table if that table is updated. This technique requires… to be invalidated – approach used by MySQL Query Cache is too coarse invalidating a lot of queries which really do not need to…

