Page 1 of 1

try to get EXPLAIN EXTENDED informations

Posted: Sun 17 Apr 2011 16:34
by thomas_w
Hi,

is there any way to get the EXPLAIN EXTENDED "warnings" using dbForge for MySQL (4.50.348)? This special warnings don't show in dbForge.

In MySQL Console I get this...

Code: Select all

CREATE TABLE obst (
 anzahl INT NOT NULL,
 art VARCHAR(20) NOT NULL,
 saison VARCHAR(20) NOT NULL
);

INSERT INTO obst VALUES
(1, 'Apfel', 'Sommer'),
(2, 'Apfel', 'Winter'),
(3, 'Bananen', 'Sommer'),
(4, 'Bananen', 'Winter'),
(5, 'Birnen', 'Sommer'),
(6, 'Birnen', 'Winter'); 

EXPLAIN EXTENDED 
SELECT * FROM obst
WHERE anzahl = 1 
   OR anzahl = 1
   OR anzahl = 1;
+----+-------------+-------+------+---------------+------+---------+------+------+----------+----
| id | select_type | table | type | possible_keys | key  | key_len | ref  | rows | filtered | Ext
+----+-------------+-------+------+---------------+------+---------+------+------+----------+----
|  1 | SIMPLE      | obst  | ALL  | NULL          | NULL | NULL    | NULL |    6 |   100.00 | Usi
+----+-------------+-------+------+---------------+------+---------+------+------+----------+----
1 row in set, 1 warning (0.00 sec)

mysql> show warnings;
+-------+------+--------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
-----------------+
| Level | Code | Message

                 |
+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Note  | 1003 | select `sample`.`obst`.`anzahl` AS `anzahl`,`sample`.`obst`.`art` AS `art`,`sample`.`obst`.`saison` AS`saison` from `sample`.`obst` where ((`sample`.`obst`.`anzahl` = 1) or (`sample`.`obst`.`anzahl` = 1) or (`sample`.`obst`.`anzahl` = 1)) |
+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)

mysql>
with kind regards
Thomas

Posted: Mon 18 Apr 2011 07:05
by Alexz
Thank you for this question.
dbForge Studio has the SQL Profiler functionality that can help you to profile your query not only with results of EXPLAIN query.
But it doesn't show the 'show warnings' results. We'll consider implementing this feature in one of next versions of the product.