June 19, 2013

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

… see if you’re right or can prove me wrong! Back in 2009, I finished what seemed an epic…288+ n_length+int_length+com_length > 65535L || int_count > 255) { my_message(ER_TOO_MANY_FIELDS, ER(ER… few more columns in InnoDB! This led me on another idea… what is the minimum maximum number of columns you…

Post: When EXPLAIN estimates can go wrong!

innodb_stats_sample_pages really would have no effect on the “numbercount of rows: mysql [localhost] {msandbox} (foo2) > select count(*) from test_estimate where type=6 \G *************************** 1. row *************************** count

Post: ANALYZE: MyISAM vs Innodb

… to find number of exact values in the table. Now let us populate antest_innodb table which is same but uses Innodb format… we get very wrong cardinality which shows us index prefix is unique (245900 is estimate for the row count in the table… key(c,i) approximately to number of rows in the table treating all nulls different values. Innodb on the contrary treats all…

Post: Fun with the MySQL pager command

counting the number of sleeping connections can be done with: mysql> SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND=’Sleep’; +———-+ | COUNT(*) | +———-+ | 320 | +———-+ and counting the number

Post: Make your file system error resilient

…/data Filesystem UUID: f9f7a0c3-0350-46d5-9930-29c3ac1f4b32 Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) Filesystem features: has_journal ext… serving wrong data) a little bit longer ? For most systems it is not worth tradeoff. Even more if you’re running Innodb… options you might want to tune with tune2fs: Reserved block count: 0 Number of blocks reserved for root. It often defaults to…

Comment: Returning to InnoDB scalability

InnoDB: Failing assertion: (buf_pool->flush_list).count > 0 InnoDB: We intentionally generate a memory trap. InnoDB…crashed, something is definitely wrong and this may …InnoDB: buffer… 060804 21:29:29 InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 45 3501426558. InnoDB

Post: Multi Range Read (MRR) in MySQL 5.6 and MariaDB 5.5

… high numbers for Innodb_buffer_pool_read_ahead which shows that the access pattern was sequential and hence InnoDB…and MariaDB 5.5. Handler_mrr_rowid_refills counts how many times the buffer used by MRR… thing when benchmarking ICP, the optimizer made a wrong choice. It looks like that there is still…

Post: How to find MySQL queries worth optimizing ?

…database access happening at all – you would be wrong. The index lookup is being perform but … Tmp_table_sizes: 0 # InnoDB_trx_id: 12F24 SET timestamp=1347399108; select count(*) from sbtest group by k…functions are removed (A) – look at number of rows examined divided by number of tables in join (B) …

Post: Why MySQL could be slow with large tables ?

… index: mysql> select count(pad) from large; +————+ | count(pad) | +————+ | 31457280 | +————+ …are also clustered keys in Innodb which combine index access … becomes smaller, but dramatically increased number of index lookups which … read) – this is way wrong. Do not take me…

Post: Debugging problems with row based replication

… doesn’t know anything is wrong.  This isn’t the case…AUTO_INCREMENT, PRIMARY KEY (`c1`) ) ENGINE=InnoDB; Query OK, 1 row affected … play with: select count(*) from t1; +———-+ | count(*) | +———-+ |    65536 | +———-+ 1 row in …Table_map: `repl`.`t1` mapped to number 15 #100506 12:42:56…