June 18, 2013

Post: Moving Subtrees in Closure Table Hierarchies

the same table in a single query in MySQL. But we can use MySQL’s multi-table DELETE syntax, to findof itself. I also wrote about Closure Table in my book, SQL Antipatterns: Avoiding the Pitfalls of Database

Post: Analyzing Slow Query Table in MySQL 5.6

the best tool for evaluating where your database response time is being spent. This month we saw the GA release ofin prior releases of MySQL, when writing slow query information to the log table, query times and lock times are truncated to to integers: sqlFIND_IN_SET(sql

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

the data, the first thing we notice is that there are a lot of “new” InnoDB tablespace files in our databasethe FT indexes on that table by querying the various I_S.INNODB_FT_* tables. In particular, the INNODB_FT_CONFIG table

Post: Eventual Consistency in MySQL

…are no orphaned rows. But there are probably hundreds of foreign key relationships in any complex database.  We can find all foreign keys by querying thetable with similar structure, and track our database design manually, so we can use the same SQL queries for quality control: mysql> CREATE TABLE

Post: High-Performance Click Analysis with MySQL

of values for various attributes, for example; or the presence or absence of values.  You can put these into the database in a little meta-tablethe clicks column record the total, and the blue_clicks column record only blue clicks; to find

Post: Quick comparison of MyISAM, Infobright, and MonetDB

of the box, for all three databases. The first thing I tried doing was loading the data with SQLthe mailing lists to find the correct COPY syntax — it wasn’t that listed in the

Post: Find and remove duplicate indexes

in our schemas can hurt the performance of our database: They make the optimizer phase slower because MySQL needs to examine more query plans. Thefind the three different types of keys explained before. Lets try it: mysql> show create table

Post: Data mart or data warehouse?

the kind of SQL which a ROLAP tool must generate to answer those queries. Performance challenges with larger databasestables in the warehouse schema example would be considered a snowflake. A dimension table (item) must be joined to additional tables (item_category,category) to find the

Post: Timezone and pt-table-checksum

the checksum table to find the chunks but still recalculates the checksums on the fly to get the actual rows in need of syncing, it will not find

Comment: Spreading .ibd files across multiple disks; the optimization that isn't

the table in the other database. For example: –This database is located on RAID10 and that we already have tables inof tables in the_db, transactional tables and log tables, and the application thinks the log tables are in `the_db`. We know that they are actually in