June 19, 2013

Post: Talking MySQL to Sphinx

TABLE `sptest` ( `id` bigint(20) unsigned NOT NULL, `site_id` int(10) unsigned NOT NULL, `forum_id` int(10) unsigned NOT NULL, `author_id` int(10) unsigned NOTnot contain any data: Sphinx select max(author_id) as a ,forum_id as f from sptest where num_links=1… be able to scan through 100M+ rows on…

Post: When is MIN(DATE) != MIN(DATE) ?

SELECT MIN(t.update_time) FROM (SELECT uid, MIN(update_time) AS “update_time” FROM foo WHERE update_time IS NOTthroughselect * from foo order by update_date limit 5; +——-+———————+ | i | update_date | +——-+———————+ | 1 | 0024-06-21 10:35:55 | | 2 | 0024-06-21 10

Post: Percona XtraDB Cluster: Multi-node writing and Unexpected deadlocks

1 Changed: 1 Warnings: 0 node3 mysql> commit; Query OK, 0 rows affected (0.00 sec) node3 mysql> select * from autoinc; +—+——-+ | i | j | +—+——-+ | 1

Post: Timezone and pt-table-checksum

through… Node2 > EDT > select * from foo.bar; +—-+————-+———————+ | id | data | date_created | +—-+————-+———————+ | 1 | node1, …will not find those rows even though pt-table-…10, 16)), 0) AS crc FROM `foo`.`bar` FORCE INDEX (`PRIMARY`) WHERE (1=1)…

Post: Updated msl (microslow) patch, installation walk-through!

…anyone who has not yet come across … sql/sql_select.cc patching …10 minutes, depending on the hardware, you will be sitting idle and watching tons of text scrolling through… system. Locate where the original mysqld … full_join, tmp_table, tmp_table_on_disk, filesort,…to only those from every (1/log_slow_…

Post: How To Test Your Upgrades - pt-upgrade

throughtable with –temp-database and –temp-table is recommended, this ensures separation of the test table from your production databases and tablesnot test against production servers, 11 1 # max 1 1 # avg 1 1 # pct_95 1 1 # stddev 0 0 # median 1 1 # Fingerprint # select * from categories where10

Comment: Long PRIMARY KEY for Innodb tables

1) select id from view.MediumTextView order by id limit 10 2) select id from view.MediumTextView force index (primary) limit 10 3) select id from view.MediumTextView wheretable), and parse out the ids. But if it uses the secondary index, it’s much fewer data pages to parse through

Post: InnoDB Full-text Search in MySQL 5.6: Part 2, The Queries!

table=’test/innodb_ft_list2′; Query OK, 0 rows affected (0.00 sec) mysql: INSERT INTO innodb_ft_list2 SELECT * FROMwhere it talks about creating one of these stopword tables, it simply mentions the tablethrough

Post: Knowing what pt-online-schema-change will do

table… DROP TABLE IF EXISTS `test`.`_t_new`; Dropped new table OK. Let’s go throughSELECT `id`, `guest_language`, `guest_country`, `score` FROM `test`.`t` FORCE INDEX(`guest_language`) WHERE

Post: Modeling MySQL Capacity by Measuring Resource Consumptions

… per select. Wait time is often IO (which you can see separately through number …% yes, 99% no # Tmp table 1% yes, 98% no # Tmp table on 1% yes, 98% no In… to 10-100 ms. The queries which are in 100us range are ones where1 IO which was not queued (less than 10 ms) or needed more than that. Going from