June 18, 2013

Post: A workaround for the performance problems of TEMPTABLE views

… almost always use the TEMPTABLE algorithm. This blog post demonstrates a workaround that allows the convenience of complex views, including those…) If we then write a SQL query to aggregate over the rows of the view and we add a filter condition on c1… be used to generate the value for the connection_id column. Also notice the restriction that v1.c1 = p.param1_val…

Post: Bug#12704861

… Engine: Data from BLOB columns could be lost if the server crashed at a precise moment when other columns were being updated in… having a record that contains a null BLOB pointer. Because we will be redo logging the writes off the off-page columns before… a comment, and add a debug assertion that a record that contains NULL BLOB pointers must be a fresh insert. row_upd_clust_rec(): When columns

Post: InnoDB Full-text Search in MySQL 5.6 (part 1)

… to add column FTS_DOC_ID | +———+——+————————————————–+ This doesn’t make a lot of sense to me. Why does InnoDB need to add a hidden column (similar to GEN_CLUST_INDEX when you don’t define a PRIMARY KEY, I assume…

Post: Shard-Query adds parallelism to queries

… is Shard-Query? Shard-Query was initially conceived as a utility to add parallelism to horizontally partitioned data sets by running queries… used in this earlier post into a partitioned InnoDB table. Partitioning example: /*!50500 PARTITION BY RANGE COLUMNS(FlightDate) (PARTITION p2 VALUES LESS…

Post: A case for MariaDB's Hash Joins

… understanding: For each tuple r in the build input R Add to the in-memory hash table If the size of…. Test Case C – Join a small table with a large table with a WHERE clause on a non-indexed column The SQL used for this… when you are joining a small table with a very large table with a where clause on a ‘non-indexed’ column In this test we…

Post: Using Flexviews - part two, change data capture

… enough. The trigger method has a lot of problems. Triggers add a significant overhead. When the structure of a table is changed, the triggers… is confusing it should be clear in a moment. Lets create a table, insert some rows, add a change log, delete rows and then… change logs contain three additional metadata columns: dml_type, uow_id and fv$server_id. These columns represent the type of change…

Post: Tools and Techniques for Index Design Webinar Questions Followup

a query, but ultimately it arrives at similar conclusions as the star system: define an index with all columns in the predicate, add columns to avoid sorting per query, and add further columns to cover the select-list. The difference is that QUBE helps you to predict quantitatively how much a new…

Post: Knowing what pt-online-schema-change will do

… `test`.`_t_new` add column (foo char(2)) Altered `test`.`_t_new` OK. Not creating triggers because this is a dry run. CREATE… –alter statement: Altering new table… ALTER TABLE `test`.`_t_new` add column (foo char(2)) Altered `test`.`_t_new` OK. If the… make such a grievous mistake, but on never knows. Are the columns used correctly given their data types and definitions?  If a column is…

Post: A rule of thumb for choosing column order in indexes

I wanted to share a little rule of thumb I sometimes use to decide which columns should come first in an index… any database server with b-tree indexes. And there are a bunch of subtleties, but I will also ignore those for… start with this query, which returns zero rows but does a full table scan. EXPLAIN says there are no possible_keys…