Find the answer to your Linux question:
Results 1 to 3 of 3

Thread: Index

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer
    Join Date
    Nov 2002
    Queens, NY


    Can someone explain to me what indexes are? This is the one topic I cannot seem to grasp.
    The best things in life are free.

  2. #2
    Linux Engineer
    Join Date
    Apr 2003
    An index are in short term a shortcut... the database keep track of the fields,columns you have put your index on, so it knows for example how many lines it is on that column (keeps statistics),

    indexes are used to prevent full table scans which means that the database have to check all lines in a table to find the value it wants. If an index can be used, the query just have to go throw for example 30000 lines instead of 10000000 lines for a full table scan.

    To get the best performance you have to know a litte about databases and how they function and good knowledge about SQL-language.




  3. #3
    Linux Guru
    Join Date
    Oct 2001
    Täby, Sweden
    Yeah, indexes are basically for filtering rows to find the most relevant hits faster. If you use indexes on columns that you use very much in WHERE ops or grouping and linking ops, you will get better performance. They do take extra hard drive space, though, so its not necessarily a good idea to use them on all columns.
    I'm sure the MySQL manual says a lot about it if you want to check it out.

  4. $spacer_open

Posting Permissions

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