MySQL Forums
Forum List  »  Optimizer & Parser

Re: explain a prepared statement
Posted by: Dorian Kuroki
Date: March 14, 2011 07:11AM

Hi,

From the mysql command line.

I need to know what is the way to see the execution plan of a prepared statement:
For example:

mysql> use database_test
mysql> prepare stat_test from " SELECT * from table1, table2 where field1= ? and ....";
mysql> SET @test_parameter = "xxx";
mysql> EXECUTE stat_test USING @test_parameter;
--- RESULT SET IS OK
mysql> explain EXECUTE stat_test USING @test_parameter;

ERROR 1146 (42S02): Table 'database_test.execute' doesn't exist


Many thanks

Dorian

Options: ReplyQuote


Subject
Views
Written By
Posted
3309
March 09, 2011 07:07AM
1510
March 13, 2011 02:13PM
Re: explain a prepared statement
3438
March 14, 2011 07:11AM
1972
March 14, 2011 06:22PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.