Question about table scan
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Question about table scan

  1. #1
    Join Date
    Oct 2008
    Location
    Chandigarh, India
    Posts
    322

    Question about table scan

    See the following query:

    select a from test where c=10;

    Suppose we have a composite index on columns(c,a). Will all the data in this case be retrieved using index without actually referring the base table?
    lucky

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    have you tested it - to try and learn?

  3. #3
    Join Date
    Oct 2008
    Location
    Chandigarh, India
    Posts
    322
    As simple 'yes' wouldn't have killed you. I asked it because I was home and it was teasing my mind and I didn't have access to some Oracle Installation. I just tested it. It is Index Fast Full Scan feature.
    lucky

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    it actually depends on cardinality ... optimizer may decide or not to rely on index depending on percentaje of rows expected to be retrieved.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  5. #5
    Join Date
    May 2002
    Posts
    2,645
    Quote Originally Posted by mahajanakhil198 View Post
    As simple 'yes' wouldn't have killed you. I asked it because I was home and it was teasing my mind and I didn't have access to some Oracle Installation. I just tested it. It is Index Fast Full Scan feature.
    Installing Oracle on a home PC won't kill you either.

  6. #6
    Join Date
    Oct 2008
    Location
    Chandigarh, India
    Posts
    322
    Quote Originally Posted by stecal View Post
    Installing Oracle on a home PC won't kill you either.
    haha. This is being blown out of proportion. That requires copying a dump from office system and that's a kind of breach.
    lucky

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