June 20, 2013

Post: Implementing SchemaSpy in your MySQL environment

in a database and generates a visual representation of it in a browser-displayable format. It lets you click through the hierarchy of database tables…”> table=”parent” column=”parent_id”/> table> tables> If you’re looking for other examples you can find a more …

Post: MySQL and the SSB - Part 2 - MyISAM vs InnoDB low concurrency

… there is approximately 12GB of data in the largest table. You can find the individual SSB query definitions in my previous blog post. Test… more IO than MyISAM when the database is cold, but uses less CPU time when the database is hot. I am only… InnoDB when the database is cold, but the opposite is true when the database is hot. SSB Flight #3 Here in some cases…

Post: Understanding the maximum number of columns in a MySQL table

in MySQL, we’ll see that it’s defined as 4096. This, however, is not the true limit. To find…characters after a dot in a file name. Back in 1979, Monty developed an in-house database named UNIREG. …sql; So the maximum number of columns for a table in MySQL is somewhere between 191 and 2829, depending…

Post: How to recover table structure from InnoDB dictionary

… readable table name in form database_name/table_name e.g. sakila/actor. `ID` is a table identifier. We will need the table id to find indexes of the table… to find InnoDB pages which belong to the table‘s index. Which one? A table can have many secondary indexes, but only in the…

Post: Repair MySQL 5.6 GTID replication by injecting empty transactions

…Duplicate entry ’4′ for key ‘PRIMARY” on query. Default database: ‘test’. Query: ‘insert into t VALUES(NULL,’salazar…:1-4 There are different ways to find the failed transaction. You can examine the …and Slave servers. pt-table-checksum can help you here, which is found in Percona Toolkit for MySQL…

Post: More on MySQL transaction descriptors optimization

In order to understand more about differences between results we have rerun tests on several our boxes. You can find… updates to the database, all SELECT queries, even those participating in read-only transactions,…1024> –test=oltp.lua –oltp_tables_count=8 –oltp-table-size=1000000 –rand-init=on –…

Post: Falcon Storage Engine Design Review

… for database only, so if you have started transaction accessed table in database A and a while after accessed table in database B, you will see records in… (HY000): Record has changed since last read in table ‘t’” error message. If you find Falcon or Innodb behavior better still prepare for…

Post: Moving Subtrees in Closure Table Hierarchies

… storing and querying trees in an SQL database, including the design I call Closure Table. In Closure Table, we store every path in a tree, not… from the same table in a single query in MySQL. But we can use MySQL’s multi-table DELETE syntax, to find any path that… else takes care of itself. I also wrote about Closure Table in my book, SQL Antipatterns: Avoiding the Pitfalls of Database Programming.

Post: Recovering Innodb table Corruption

in Innodb tablespace got corrupted. In such cases Innodb will typically print something like this: InnoDB: DatabaseTABLE says table is OK. This means You Can’t Trust CHECK TABLE in Innodb to be sure your tables are good. In

Post: Recovering CREATE TABLE statement from .frm file

database we will see the following MySQL creative error message: mysql> show tables; +—————-+ | Tables_in_test | +—————-+ | queue | | test_innodb | +—————-+ 2 rows in