Is there any way to view the mysql/oracle query execution plan as like java debugging. i want to know how mysql/oracle executes our query and what are the steps involved in execution.
For mysql you should use
EXPLAIN SELECT * FROM tableX
see mysql reference
For oracle there is something similar but more detailed:
EXPLAIN PLAN FOR <query>
EXPLAIN PLAN FOR SELECT * FROM tableX
see also: reference for oracle