June 19, 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…: Tables – Names, number of children, parents, count of columns, row counts, and comments — a great way for a high level overview of the table

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

… a dot in a file name. Back in 1979, Monty developed an in-house database named …table_options),reclength); if (info_length+(ulong) create_fields.elements*FCOMP+288+ n_length+int_length+com_length > 65535L || int_count…So the maximum number of columns for a table in MySQL is somewhere between 191 and …

Post: Is Synchronous Replication right for your app?

…users and groups in your application.  These are maintained in separate tables and there also exists a users_groups table to define… database periodically? if( $last_count % 100 == 0 ) { $db->do( “UPDATE achievements SET count = $last_count where achievement = ‘killed_troll’”; } change your schema In

Post: More on MySQL transaction descriptors optimization

… non-trivial amount of updates to the database, all SELECT queries, even those participating in read-only transactions, start suffering from the… sysbench –num-threads=<1..1024> –test=oltp.lua –oltp_tables_count=8 –oltp-table-size=1000000 –rand-init=on –report-interval=1 –rand…

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

in our databasetable by querying the various I_S.INNODB_FT_* tables. In particular, the INNODB_FT_CONFIG table

Post: Faster Point In Time Recovery with LVM2 Snaphots and Binary Logs

count(*) from salaries where emp_no = 10001; +———-+ | count(*) | +———-+ | 0 | +———-+ 1 row in set (0.00 sec) mysql> show tables; +———————+ | Tables_in_employees | +———————+ … | salaries | … +———————+ 6 rows in

Post: A common problem when optimizing COUNT()

… with COUNT(). This is database-agnostic, not related to MySQL. The problem is when the COUNT() contains a column name, like this: select count(col1) from table… are the same thing. COUNT(*) always counts the number of rows in the result. If you write COUNT(col1) it counts the number of times…

Post: Researching your MySQL table sizes

… by particular table “type” in sharded environment when multiple tables with same structure and similar name exists: SELECT count(*) tables, concat(round(sum(table_rows)/1000000… | 0.00 | +——–+———+———+——-+————+———+ 1 row in set (0.03 sec) Find biggest databases SELECT count(*) tables, table_schema,concat(round(sum(table_rows)/1000000,2),’M') rows…

Post: Statistics of InnoDB tables and indexes available in xtrabackup

in the case of a VARCHAR – since you need to estimate average length) on count… that running statistics on your backup database does not need to hurt …table in Barracuda format with Fast creation method: table: art/link_out104, index: domain_id, space id: 15, root page 49160 estimated statistics in

Post: Beware the Innodb Table Monitor

… stated in my last post, I decided to use the Innodb Table monitor to diagnose an Index count mismatch error a customers found in….   To use it, you create a table (in any database you choose), like this: CREATE TABLE innodb_table_monitor (a INT) ENGINE=INNODB; This, primitively… in ‘Opening Tables‘ were waiting for the dict_sys->mutex, which is required for opening tables in Innodb. It would be better for the Table