DBAsupport.com Forums - Powered by vBulletin
Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Indexing Strategy to Increase performance

  1. #1
    Join Date
    Jan 2004
    Posts
    25

    Indexing Strategy to Increase performance

    Hi guys i have a database that requires an indexing strategy to increase performance and i have to justify my reasons, what information would you need to help me with this?

  2. #2
    Join Date
    May 2001
    Location
    San Francisco, California
    Posts
    511
    If the database is currently running and is being accessed by applications, I would start with looking at the top 10 queries that are consuming the maximum amount of resources. Start indexing the tables.. measure the cost (explain plan) before and after indexing.. and go from there.

    Also start running STATSPACK taking a database snap every fifteen minutes. Generate the report for the snapid's that begin and end during the period of PEAK USAGE. From the report you can figure out what quries you need to tune to improve performance.
    Remember the Golden Rule - He who has the gold makes the rules!
    ===================
    Kris109
    Ph.D., OCP 8i, 9i, 10g, 11g DBA

  3. #3
    Join Date
    Jan 2004
    Posts
    25
    thanks kris, im only familiar with the basics of indexing, its for an assignment at uni so its not an active database that people are using.
    Last edited by Arnielover; 01-12-2004 at 12:07 PM.

  4. #4
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Ah, in that case you can ignore all the real-world complexities, and just index the columns which appear as predicates or joins in the required reports.

    Needless to say, this gives an academic solution of no practical value.
    David Aldridge,
    "The Oracle Sponge"

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

    Oracle ACE

  5. #5
    Join Date
    Jan 2004
    Posts
    25
    thats the sort of thing im looking for thanks slim dave, they dont teach us anything to do with the real world at uni

    If i were to post the create table statements for the tables that need indexing would that be enough information for you to advise me in which tables to inex?
    Last edited by Arnielover; 01-12-2004 at 01:01 PM.

  6. #6
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    No, not really -- you need to know what queries are going to be executed against the schema.

    The only thing you can say from the schema itself is that primary key columns and foreign key columns should be indexed, but that is trivial (as the academicians say).
    David Aldridge,
    "The Oracle Sponge"

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

    Oracle ACE

  7. #7
    Join Date
    Jan 2004
    Posts
    25
    does that mean i have to index all the foreign keys as the promary keys have already been given a unique index. What about composite foreign keys?

  8. #8
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Nothing is going to help you.
    Indexing strategy should be considered at the time of development, not after the system went live.
    Tamil

  9. #9
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by tamilselvan
    Nothing is going to help you.
    Indexing strategy should be considered at the time of development, not after the system went live.
    Tamil
    ROTFL!
    Originally posted by Arnielover
    its for an assignment at uni so its not an active database that people are using.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  10. #10
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Originally posted by Arnielover
    does that mean i have to index all the foreign keys as the promary keys have already been given a unique index. What about composite foreign keys?
    Realistic answer: It depends.

    Academic answer: Index all foreign key columns -- index composite foreign keys with composite indexes.
    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