DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: how Oracle execute this

Hybrid View

  1. #1
    Join Date
    Oct 2003
    Posts
    312

    how Oracle execute this

    I have an example:

    SQL> SELECT COUNT(*) FROM DUMMY_VW;

    COUNT(*)

    ----------

    10000



    SQL> SELECT COUNT(*) DUMMY_VW

    2 WHERE TAX_ID='END';



    COUNT(*)

    ----------

    1


    THE QUESTIONS IS: on the second query, does the view query 10000 rows and filter the one specified values by the "WHERE" clause, or does it parse out from the select ????

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    the optimizer will look at the definition of the dummy_vw view (i'm guessing that is what it is) and look for the lowest cost access path for returning the correct result.

    Read the concepts guide.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    Jan 2001
    Posts
    3,134
    Reminds me of an OCP question...

    What is the order Oracle processes a select statement.

    1) FROM
    2) WHERE
    3) SELECT
    4) ORDER BY

    In other words, FROM xxx, WHERE this is true, SELECT this data, and then sort it.

    MH
    I remember when this place was cool.

  4. #4
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    That OCP certainly hones a person's knowledge to a keen edge, what?
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width