May 23, 2012

Post: EXPLAIN EXTENDED can tell you all kinds of interesting things

EXPLAIN command, fewer people are familiar with “extended explain” which was added in MySQL 4.1 EXPLAIN EXTENDED… | Level | Code | Message | +——-+——+——————————————————————————-+ | Note | 1003 | select ’0′ AS `c1` …

Post: Extended EXPLAIN

…mysql> show warnings \G *************************** 1. row *************************** Level: Note Code: 1003 Message: select `test`.`sbtest`.`id` AS `id`,`test`.`…by EXTENDED EXPLAIN for some reason, while it would be quite helpful. Finally lets look at third example: mysql> explain extended select …

Comment: COUNT(*) vs COUNT(col)

…: mysql> explain extended select count(*) from mytable; +—-+————-+——-+——+—————+——+———+——+——+——————————+ | id…| Level | Code | Message | +——-+——+———————————————————+ | Note | 1003 | select …

Post: JOIN Performance & Charsets

… 400,000. The data set fit easily in memory. mysql> EXPLAIN EXTENDED SELECT SQL_NO_CACHE COUNT(t1.char_id) > FROM t1….00 sec) mysql> SHOW WARNINGS\G *************************** 1. row *************************** Level: Note Code: 1003 Message: select sql_no_cache count(`test`.`t1`.`char_id…

Post: A workaround for the performance problems of TEMPTABLE views

EXPLAIN EXTENDED to see that MySQL rewrites the view query to include the restriction: mysql> explain extended… | +——-+——+———————————————————————————————————————————+ | Note | 1003 | select `test`.`t2`.`…

Comment: EXPLAIN EXTENDED can tell you all kinds of interesting things

…JOIN in newer version. mysql> EXPLAIN extended SELECT j1.c1 FROM j1,… | +——-+——+—————————————————————————————————————————————————————————-+ | Note | 1003 | select `test`.`j1`.`c1`…