Re: debugging how query plans are made

Øystein Grøvlen <[email protected]> Tue, 12 Feb 2013 15:11:06 +0100
Newsgroups gmane.comp.db.mysql.devel
Organization Oracle
Message-ID <[email protected]>
On 02/12/13 02:54 PM, Zardosht Kasheff wrote:
> Hello all,
>
> In MySQL and/or MariaDB, are there any hooks or methods one can use to
> learn why a query plan is chosen over alternatives? We sometimes
> notice that a different query plan is chosen for us than InnoDB (which
> may be fine, given we are a different storage engine), and we would
> like to better understand why. Is there any debug parameter that gets
> MySQL to output decisions made in the optimizer?

MySQL 5.6 has optimizer tracing which outputs the decisions made by the 
optimizer.  See http://dev.mysql.com/doc/internals/en/optimizer-tracing.html

Hope this helps,

-- 
Øystein

-- 
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:    http://lists.mysql.com/internals