Creating the SQL Indexes for the Index Table

You must create the necessary SQL indexes for the new index table. SQL indexes speed up the indexing of records in the database. You may need to create several SQL indexes for the index table.

You complete the steps in this task using your SQL query tool. Make sure to watch for errors as you run queries.

To create the SQL index for the index table

1 Use an sp_helpindex command on an existing table to determine the SQL indexes you need to create for the new table.

For example, executing the sp_helpindex titlekw_word command produces this output:

index_name index_description index_keys

---------- ----------------- ---------

titlKW_word_word_index clustered, unique located on default word#, bib#

2 Use the create index command to create one clustered index.

This SQL index defines how the database orders entries in the new table.

For example, run this command:

create index bib_item_bib#_index on bib_item(bib#)

3 Create the additional non-clustered SQL indexes necessary for the index table.

 


© 1998-2017 Sirsi Corporation