Results 1 to 6 of 6

Thread: Presentation Topic Help Needed!!!

  1. #1
    Senior Member
    Join Date
    Feb 2004
    Posts
    1,891
    Thanks
    218
    Thanked
    61 times in 53 posts
    • jonathan_phang's system
      • Motherboard:
      • Asus Rampage III Extreme
      • CPU:
      • i7 930 @ 4.2 ghz (200x21)
      • Memory:
      • 12GB Corsair XMS3 1600
      • Storage:
      • Crucial M4 128GB SSD + Misc Data Drive
      • Graphics card(s):
      • EVGA GTX 1080 FTW
      • PSU:
      • Corsair HX850 Modular
      • Case:
      • Antec 300
      • Operating System:
      • Windows 7 x64
      • Monitor(s):
      • Asus PB278Q (27" 2560x1440)
      • Internet:
      • Virgin Media 100mb

    Presentation Topic Help Needed!!!

    Hi all,

    I was wondering if you could all help me on something (as you all seem to be a talented bunch!!). I've got to a final round interview for a graduate Analyst Programmer and have to several presentations. I'm fine on most of them, but one technical one is to talk about the following:

    In Database technology, what is an index and what are the trade-offs of having an index?

    I've done some research with books etc and at oracletuning.com so have got some info, but I'd be greatfull if I could get any extra points that I've missed.

    I need it more on the 'trade offs' part, but any tips/links would be very helpful!!!

    Come on Hexus Community,

    Help one of your own get a job

    JonnyP

  2. #2
    HEXUS.net Webmaster
    Join Date
    Jul 2003
    Location
    UK
    Posts
    3,108
    Thanks
    1
    Thanked
    0 times in 0 posts
    The main trade-off with having an index is having one on a table on which you will be doing a lot of INSERT statements.

    Indexes are used to make searching a table for data lot faster. However, in order to keep the index up to date it is modified with every INSERT. This means that INSERT queries take slightly longer to run as they are also modifying an index. If you imagine the HEXUS reviews table this isn't such a big deal as there are a small number of INSERTS a week as the reviewers add new content but there are thousands of SELECTS a day as people read the content. Hence, an index is performance booster.

    On the other hand, if you imagine a table that traps advert impressions then having a complex index slows things down as every ad that requires a SELECT to display it will also require an INSERT to update the table that tells you how many ads have been served. This can slow the site down.

    It is not uncommon if you are running a large batch process to add new content to a table with a large index to remove the index first. That way the batch process just loads all the data in and then the index is built at the end. This is faster than loading each row and forcing the database to update the index. To give you an idea, at work we were loading a table with around 4 billion records for assets. With the indexes left on throughout the load it would have taken around 8 days longer to perform the process

    hope that helps

  3. #3
    Goat Boy
    Join Date
    Jul 2003
    Location
    Alexandra Park, London
    Posts
    2,428
    Thanks
    0
    Thanked
    0 times in 0 posts
    ^^^ What he said

    There are different types of indexes that are available, too, depending on what the DBMS is. If you REALLY want to impress in the interview, then you can take a DB, say Oracle, find out what the different types of indexes are and how they would be best used in different situations.

    Another thing you might want to investigate is bulk inserts/transactional inserts. This method wraps up a number of inserts into a transaction, and applies them all at once. This can provide you with significant speed improvements over the standard "add record, index, add record, index".

    A common error to make is to index pretty much everything (I've seen it done). This can have a disasterous affect on performance. It's important to target which fields to index, and for that you need some sort of query analyzer. There is a really good one in MS SQL Server, and there is a fairly basic one for MySQL. These can be VERY useful tools when DB tuning.

    The number one rule to keep in mind when tuning DB's is that the one thing that will REALLY kill your performance is any form of disks access. Memory/Cache = Fast, Hard Disks - Slow. Anywhere you see a query analyzer come out with "full table scan" on a large table is a perfect example for an index.

    Finally, (tho this point is sort of redundant now, as Disk Space is so cheap), indexes will take up more disk space than the tables by themselves, so you have a trade off there. So, for example, if you had an embedded device that had a DBMS running on it (say a Palm Pilot, with solid state storage), indexes might be a bad idea.
    "All our beliefs are being challenged now, and rightfully so, they're stupid." - Bill Hicks

  4. #4
    Senior Member
    Join Date
    Feb 2004
    Posts
    1,891
    Thanks
    218
    Thanked
    61 times in 53 posts
    • jonathan_phang's system
      • Motherboard:
      • Asus Rampage III Extreme
      • CPU:
      • i7 930 @ 4.2 ghz (200x21)
      • Memory:
      • 12GB Corsair XMS3 1600
      • Storage:
      • Crucial M4 128GB SSD + Misc Data Drive
      • Graphics card(s):
      • EVGA GTX 1080 FTW
      • PSU:
      • Corsair HX850 Modular
      • Case:
      • Antec 300
      • Operating System:
      • Windows 7 x64
      • Monitor(s):
      • Asus PB278Q (27" 2560x1440)
      • Internet:
      • Virgin Media 100mb
    Az, Beeenster,

    thaks a lot for the advice there! i'd got some of the points made, but not others, so thats great. I've been researching about the different types (functional, inverted, bitmapped etc) and will try to drop in a few pointers about each.

    Again, really appreciated (keep em coming tho!!)

    JP

  5. #5
    Goat Boy
    Join Date
    Jul 2003
    Location
    Alexandra Park, London
    Posts
    2,428
    Thanks
    0
    Thanked
    0 times in 0 posts
    What type of firm is it? Sofware house/Consultancy/Banking?
    "All our beliefs are being challenged now, and rightfully so, they're stupid." - Bill Hicks

  6. #6
    Senior Member
    Join Date
    Feb 2004
    Posts
    1,891
    Thanks
    218
    Thanked
    61 times in 53 posts
    • jonathan_phang's system
      • Motherboard:
      • Asus Rampage III Extreme
      • CPU:
      • i7 930 @ 4.2 ghz (200x21)
      • Memory:
      • 12GB Corsair XMS3 1600
      • Storage:
      • Crucial M4 128GB SSD + Misc Data Drive
      • Graphics card(s):
      • EVGA GTX 1080 FTW
      • PSU:
      • Corsair HX850 Modular
      • Case:
      • Antec 300
      • Operating System:
      • Windows 7 x64
      • Monitor(s):
      • Asus PB278Q (27" 2560x1440)
      • Internet:
      • Virgin Media 100mb
    Its for the 'Business Applications' Team of News International ltd. Its the UK subsiduary of News Corp, Rupert Murdochs company that has holdings of BskyB, Fox etc.

    The UK part handles production of the sun, news of the world, the times amongst others. The job I'm going for mainly deals with advertising (production of online booking, etc planning) using unix, VB, oracle, PL/SQL.

    Got to the final 3 applicants so I'm busy preparing some presentations. Bit nervous, but fingers crossed, I'll do ok!

    JP

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Windows 98se Updates? Help Needed
    By Jimmy Little in forum Software
    Replies: 9
    Last Post: 01-12-2003, 01:27 AM
  2. how many posts needed
    By tommy6206 in forum General Discussion
    Replies: 6
    Last Post: 08-10-2003, 01:18 PM
  3. Radeon 8500 linux driver install problems
    By Dorza in forum Software
    Replies: 0
    Last Post: 22-09-2003, 12:00 PM

Posting Permissions

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