Basic Indexes question.
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Basic Indexes question.

  1. #1
    Join Date
    Feb 2009
    Location
    U.K.
    Posts
    3

    Basic Indexes question.

    Hello,

    I'm using Oracle's RDBMS (PL/SQL),

    I am looking into how Indexes are created.

    Can an Index only index a single table, or can it index 2 or more tables?

    Many thanks for any help.

  2. #2
    Join Date
    Mar 2006
    Location
    Charlotte, NC
    Posts
    865
    Single table. You can't create the Index with columns from different tables.

    Thanks,
    Vijay Tummala

    Try hard to get what you like OR you will be forced to like what you get.

  3. #3
    Join Date
    Feb 2009
    Location
    U.K.
    Posts
    3
    Thank you vnktummala,

    I've read a whole chapter on Indexes and not once did it say whether they did or not.

    I wanted to make sure. Thank you very much.

    That makes them much more simple to understand now.

    Formed from a Primary Key and a pointer to a row.


  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    well think about it and see how stupid even the concept of an index across two tables is.

    Simple stuff doesnt need to be stated explicitly

  5. #5
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    Quote Originally Posted by vnktummala View Post
    Single table. You can't create the Index with columns from different tables.
    I would agree if you are talking about normal, everyday indexes but -there is always a but, huh? - remember you can build a joint bitmap index which would actually be indexing two tables together -those little rascals have proven to be very effective in some DWH scenarios.
    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.

  6. #6
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    Quote Originally Posted by Artificial View Post
    Formed from a Primary Key and a pointer to a row.
    Please read the chapter again. PKs are constraints, they are not indexes. A unique index would be used to enforce a PK.
    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.

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