Indexes

  • hello,

    I heard in sql indexes are most use full to reduce execution time..

    is it correct ..? and I cant understand how to apply Indexes to table.

    I attached one jpg file.That file table have 20 columns and 200000 rows.I need to create indexes to that table ..to reduce execution time.

    Plz tell me how to apply indexes to that table....

    regards:

    Dastagiri.D

    Thanks
    Dastagiri.D

  • Unfortunately, you can't decide what indexes should be created just looking at the table. What is important are the different queries (select/insert/update/delete) that will be run against the table(s) in a database.

    Every table should have a clustered index, but what makes a good clustered index for one table may not be a good clustered index for another. Every table should (some would say must) have a primary key. This uniquely identifies each row of a table.

    You can use the Database Tuning Advisor to help determine what indexes you should have, or dynamic management views as well to help there.

    My first suggestion, however, is to start reading Books Online about indexing. As you read the various topics there, and have questions that could use additional exlpanation, please feel free to post your questions here.

  • In addition to the excellent info from Lynn - the biggest thing to see is that in most cases you don't "pick" the index, the query compiler picks the index. So - it's a matter of giving it some good choices to pick from, and it will use the best one it determines.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply