CCNC/CCNC Module 5/Designing and creating tables/Table Design and Layout/Adding Indexes
|Table Design and Layout|
Adding indexes to a Table
Adding indexes to a table
As mentioned in the previous section it is important to add indexes to tables as they increase data retrieval performance. After adding new fields to the PhoneNumbers table it is beneficial to add indexes to certain fields.
Adding the index
Once the Index design dialog is available the new index button should be pressed to create a new index. When you open the index designer you may notice indexes are already present. These are indexes created when you set the primary and foreign keys.
Naming the index
Once you have created the new index the field needs to be chosen and the sort order set. A meaningful name should be given to the index where the name of the field being indexed is a part of the indexes name. This will be helpful in identifying the index. You can create many indexes and they will all be saved once you press the 'Save' button on the index design dialog.
Test your knowledge