Saari Development

Ali Rizvi's Technical Blog as a Professional Software Development Engineer

Oracle: Explain Plan from SQLPlus

leave a comment »

I have been spoiled by simple way for getting a explain plan from MySQL and web tools for oracle.

Today somebody asked me how to get an explain plan from oracle command line sqlplus and I discovered it is a little painful. Here is what I found out:

explain plan for select * from shiny_complex_table;

  substr (lpad(' ', level-1) || operation || ' (' || options || ')',1,30 ) "Operation",
  object_name                                                              "Object"
start with id = 0
connect by prior id=parent_id;



Written by imsaar

October 13, 2009 at 2:32 am

Posted in database, oracle

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: