June 20, 2013

Post: Experiences with the McAfee MySQL Audit Plugin

… plugin API gives us more flexibility by allowing users to extend the server’s functionality with their own code, and this… you also need to do this, the details are clearly explained here. The plugin writes its output in json format, and…, the plugin API seems to be opening new possibilities of extending MySQL’s behavior in a way that, once set up…

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

… familiar with the MySQL EXPLAIN command, fewer people are familiar with “extended explain” which was added in MySQL 4.1 EXPLAIN EXTENDED can show you…. EXPLAIN EXTENDED adds a warning message to the EXPLAIN output which displays additional information, including the rewritten query. To take a look at EXPLAIN EXTENDED

Post: Extended EXPLAIN

… shown by EXTENDED EXPLAIN for some reason, while it would be quite helpful. Finally lets look at third example: mysql> explain extended select * from…,…10) it completes in tiny fraction of the second. Anyway EXPLAIN EXTENDED is very valuable addition to EXPLAIN for MySQL Performance troubleshooting.

Post: Extending Index for Innodb tables can hurt performance in a surprising way

…; +———-+ | count(*) | +———-+ | 60434 | +———-+ 1 row in set (0.69 sec) mysql> explain select count(*) from idxitest where a=5 and b=5… in set (0.00 sec) The obvious optimization is to extend index from column (a) to column (a,b) right which…; +———-+ | count(*) | +———-+ | 60434 | +———-+ 1 row in set (0.02 sec) mysql> explain select count(*) from idxitest where a=5 and b=5…

Post: A workaround for the performance problems of TEMPTABLE views

… sec) We can use EXPLAIN EXTENDED to see that MySQL rewrites the view query to include the restriction: mysql> explain extended select c1, count… old one. We no longer examine millions of rows: mysql> explain select * from v2 where c1 = 10; +—-+————-+————+——–+—————+———+———+——-+——+————————–+ | id | select_type | table…

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

Oh yes, I forgot to mention explain extended is very unstable and will crash server for certain queries.. put [ site:bugs.mysql.com "explain extended" crash ] into google for proof :) be careful!

Comment: COUNT(*) vs COUNT(col)

… similar to count(0) as you cas se here: mysql> explain extended select count(*) from mytable; +—-+————-+——-+——+—————+——+———+——+——+——————————+ | id | select_type | table | type | possible… similar to count(1) as you can se here: mysql> explain extended select count(1) from mytable; +—-+————-+——-+——+—————+——+———+——+——+——————————+ | id | select_type | table | type…

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

I use explain extended to know the table name that the column belongs. I lot of programmers do not mention the table alias before the column name in the query, if the column name is unique. I find it easy to use extended to know the table name.

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… execution time of 3.12 seconds and had the following EXPLAIN: *************************** 1. row *************************** id: 1 select_type: SIMPLE table: t1 type…

Comment: Feature Idea: Finding columns which query needs to access

Does it have to be an extension to EXPLAIN? A standalone script (say written in perl or so) would … it would be interresting to have it also available like EXPLAIN EXTENDED or something…