June 19, 2013

Post: Implementing SchemaSpy in your MySQL environment

mysql.jdbc.Driver connectionSpec=jdbc:mysql://127.0.0.1:5610/schemaspy driverPath=/usr/share/java/mysql-connector-java.jar Example Schema CREATE TABLEschema name information. Viewing SchemaSpy output A completed Relationships view of these three tables

Post: Is Synchronous Replication right for your app?

information and puts it into context with your application workload: [In a Galera cluster] a given rowMySQL replication from this instance, since MySQL replication is asynchronous. What about semi-sync MySQLschema In Example 2, above, how above moving the ‘joined’ column to the users_groups table

Post: How to recover deleted rows from an InnoDB Tablespace

…://dev.mysql.com/doc/refman/5.5/en/innodb-physical-record.html You can also get the table row format from the Information Schema: mysql (information_schema) > SELECT ROW_FORMAT from TABLES WHERE TABLE_SCHEMA=’employees’ AND TABLE_NAME=’salaries’; +————+ | ROW_FORMAT | +————+ | Compact | +————+ ~/recovery-tool…

Post: Solving INFORMATION_SCHEMA slowness

… box: mysql> select count(*),sum(data_length) from information_schema.tables; +———-+——————+ | count(*) | sum(data_length) | +———-+——————+ | 130 | 2856365892 | +———-+——————+ 1 row in set (1.08 sec) mysql> set…, 0 rows affected (0.00 sec) mysql> select count(*),sum(data_length) from information_schema.tables; +———-+——————+ | count(*) | sum(data_length) | +———-+——————+ | 130 | 2856365892 | +———-+——————+ 1 row in set…

Post: INFORMATION_SCHEMA tables in the InnoDB pluggable storage engine

INFORMATION_SCHEMA tables that show some status information about InnoDB. Here are the tables: mysql> SHOW TABLES FROM INFORMATION_SCHEMA LIKE ‘INNODB%’; +—————————————-+ | Tables_in_INFORMATION_SCHEMA

Post: Troubleshooting MySQL Memory Usage

… current MEMORY tables: mysql> select sum(data_length+index_length) from information_schema.tables where engine=’memory’; +——————————-+ | sum(data_length+index_length) | +——————————-+ | 126984 | +——————————-+ 1 row in…

Post: When Does InnoDB Update Table Statistics? (And When It Can Bite)

INFORMATION_SCHEMA.TABLES and INFORMATION_SCHEMA.STATISTICS) When 1 / 16th of the table or 2Billion rows has been modified, whichever comes first. ./row/row0mysql.c:row

Post: Using innodb_sys_tables and innodb_sys_indexes

…additional information_schema tables we added in Percona Server. I was doing simple ALTER TABLE such as: “alter table… 4 rows in set (0.00 sec) mysql> select * from innodb_sys_indexes where table_id=13; +———-+———+———-+——+———-+———+——-+ | INDEX_ID | NAME | TABLE

Post: Should we give a MySQL Query Cache a second chance ?

…, for which tracking exact rows used from query syntax may be hard. Query Cache Storage Engines MySQL Query Cache now stores queries… Cache content and operation can be presented as some INFORMATION_SCHEMA tables. Self Refresh MySQL Query Cache causes not uniform performance as you get…

Post: Eventual Consistency in MySQL

… foreign key. mysql> SELECT * FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_NAME IS NOT NULL\G *************************** 1. row *************************** CONSTRAINT_CATALOG: def CONSTRAINT_SCHEMA: test CONSTRAINT… LIKE INFORMATION_SCHEMA.KEY_COLUMN_USAGE; mysql> INSERT INTO test.MY_KEY_COLUMN_USAGE SET CONSTRAINT_SCHEMA = ‘ecommerce’, CONSTRAINT_NAME = ‘fk_lineitems’, TABLE_SCHEMA = ‘ecommerce’, TABLE_NAME…