SQL Server 7 Indexes

Results 1 to 2 of 2

Thread: SQL Server 7 Indexes

  1. #1
    Join Date
    Dec 1969

    Default SQL Server 7 Indexes

    Hi, I have question about Indexes. I have read that creating indexes on columns that are searched alot can help fine tune one&#039;s database. I was wondering, when I create my index in sql server, do i need to modify my sql statements in ASP. Do I need to change my "sql select" statements to where it does not select the column name, but the index I created on that column, or does sql server 7 do this automatically.<BR><BR>Now my code has sql="select column_name from table". If I create a index for "column_name" and name it "column_index", do I need to change my query to say sql="select column_index from table". I know this may be a newbie question, but I could not resist.

  2. #2
    Join Date
    Dec 1969

    Default No

    this shouldn&#039;t be necessary. SQL Server is smart enough to use the index if that would gain performance.<BR><BR>Check the execution plan in Query Analyzer to see if the index is being used.<BR><BR>This said, what you asked *is* possible. You can give index hints in the from clause. But this is only for really experienced DBA&#039;s.<BR><BR><BR><BR><BR>

Posting Permissions

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