940340 wrote:Regardless of what interface you use, the query is passed to the sql engine, parsed, execution plan determines, executed and then data provided back to fetching calls.
Good evening folks,
What happens when we execute a query from sql developer or toad?
How oracle retrieves the data from the table?In how much detail do you want to know that? You could get a very technical answer going down to the I/O on the operating system files that are the underlying database, along with the processes used by the oracle server to do that. For that sort of thing you should go on a DBA course to learn how the database works internally, it's really beyond the scope of the forums to describe that.
How the execution plan is prepared by oracle server?Again, this is stuff in the documentation and stuff you get taught on a good SQL course (I can recommend Oracle University, they have some very good courses).
Will the process be different if we executed the same query say from sql *plus?No, the basic premise of a query is the cursor, and all cursors are processed using the same formula. The interface you issue the cursor from is irrelevant to how the query is executed itself, though the cursor styles and methods can vary syntactically and programmatically at the interface level, whether that interface is SQL*Plus, TOAD, SQL Developer, PL/SQL code, Application Express, or whatever.