• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 2. What Every Developer Needs to... > Using Indexes to Improve Performance

Using Indexes to Improve Performance

As previously mentioned, indexes can help you improve your application's performance. You should create indexes on any fields you sort, group, join, or set criteria for, unless those fields contain highly repetitive data. Queries can greatly benefit from indexes, especially when indexes are created for fields included in your criteria, fields used to order the query, and fields used to join two tables that are not permanently related but are joined in a query. In fact, you should always create indexes for fields on both sides of a join. If your users are using the Find dialog box, indexes can help reduce the search time. Remember, the downsides to indexes are the disk space they require and the amount of time it takes to update them when adding, deleting, and updating records. You should always perform benchmarks with your own applications, but you will probably find indexes helpful in many situations.

NOTE

When you establish a relationship between two tables, an index for the table on the many side of the relationship (the foreign key field) is automatically created. For example, if you relate tblOrders to tblCustomers based on the CustomerID field, an internal index is automatically created for the CustomerID field in the tblOrders table. It is therefore not necessary for you to explicitly create a foreign key index. Relationships are covered in Chapter 3, “Relationships: Your Key to Data Integrity.”



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint