June 19, 2013

Post: MySQL Query Patterns, Optimized - Webinar questions followup

…. If you’re talking about using a temporary table to store an interim result set, and then use that to ultimately produce the…. There are other drawbacks to using temporary tables in this way, for example when using replication, a temporary table could vanish if the slave… that and why it helped? When I did not use the STRAIGHT_JOIN, the query optimizer reordered the tables.  It seemed to…

Post: A case for MariaDB's Hash Joins

…nationkey | i_s_nationkey | 5 | const | 808 | 100.00 | Using where; Using index; Using temporary; Using filesort | | 1 | SIMPLE | lineitem | ref | i_l_suppkey | i…always uses the max values join algorithm. If join_cache_level=4 it always uses BNLH (hash join), if join_cache_level=8 it always uses

Post: Enum Fields VS Varchar VS Int + Joined table: What is Faster?

…: NULL key_len: NULL ref: NULL rows: 1439943 Extra: Using temporary; Using filesort *************************** 2. row *************************** id: 1 select_type: SIMPLE table: …filesort) is required, which also makes MySQL to store Join result in temporary table to do the sort, all together makes…

Post: Be careful when joining on CONCAT

… I did – forced it to use key, forced a different join order, it did not want to use tb1.vid index for it… key: gid key_len: 4 ref: const rows: 53 Extra: Using where; Using temporary; Using filesort *************************** 2. row *************************** id: 1 select_type: SIMPLE table…

Post: MySQL EXPLAIN limits and errors.

….0 with addition of greedy join the problem on looking at too many table join combinations in joins with very large tables is… possibly complex queries it can give you head ache. filesort, using temporary are always in the first line So it is impossible… creates temporary table and so how much rows will be stored to temporary table. Sometimes it is enough to perform sorting or use temporary

Post: MySQL VIEW as performance troublemaker

… a macro or Temporary Table in which case VIEW is materialized to temporary tables (without indexes !) which is later used further in query… query used for temporary table creation from the outer query and plus if you use more then one Temporary Tables views which you join together… and “full joinused to to join between them. In this particular case it is not that bad because “join cache” is used to perform…

Post: The MySQL optimizer, the OS cache, and sequential versus random I/O

…_JOIN: explain select STRAIGHT_JOIN …. +——-+———–+———–+———————————+ | table | type | rows | Extra | +——-+———–+———–+———————————+ | fact | ALL | 147367284 | Using temporary; Using filesort | | dim1 | eq_ref | 1 | Using

Post: Using Flexviews - part one, introduction to materialized views

… results of a SQL statement into a table (even a temporary table) is called materializing the results. Views are similar to… other conditions must be fully computed and stored in a temporary table before they can be accessed, which is very expensive… (no outer join), no non-deterministic functions, etc. There is overhead for change-data capture. Some extra storage is used for the…

Post: Derived Tables and Views Performance

… materializing them in the temporary table, furthermore temporary table with no indexes (so you really do not want to join two derived tables…. Consider using temporary views instead of derived tables If you really need to use subselect in from clause consider creating view using it in…

Post: ORDER BY ... LIMIT Performance Optimization

…const | 1 | Using temporary; Using filesort | | 1 | SIMPLE | t | ref | k | k | 4 | test.test.i | 1 | Using where; Using index | … use index to do ORDER BY with JOIN MySQL still will not be able to use