This discussion is archived
3 Replies Latest reply: Dec 4, 2012 3:09 AM by BluShadow RSS

select *from employee

Rahul_India Journeyer
Currently Being Moderated
Good evening folks,

What happens when we execute a query from sql developer or toad?
How oracle retrieves the data from the table?
How the execution plan is prepared by oracle server?

Will the process be different if we executed the same query say from sql *plus?

Thanks
Rahul Raj
  • 1. Re: select *from employee
    Saubhik Guru
    Currently Being Moderated
    http://awads.net/wp/2006/06/28/how-the-oracle-database-processes-sql-statements/
    Also don't forget to visit the "Concept" guide mentioned in the article.
  • 3. Re: select *from employee
    BluShadow Guru Moderator
    Currently Being Moderated
    940340 wrote:
    Good evening folks,

    What happens when we execute a query from sql developer or toad?
    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.
    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.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points