Access application: Carefully select the index

Source: Internet
Author: User
Tags key domain access

Select Index carefully

Access uses a cable to classify data in a reasonable order based on the data type. Proper indexing can improve performance, while incorrect indexing can reduce efficiency. The most common mistake so far has been to set too many indexes. Because Access upgrades the index every time you add or change a record, too many indexes can affect its performance. Fortunately, you can use some guidance on indexing to help you:

Keep in mind that a PRIMARY key constraint is automatically categorized as an internal action that you cannot control. In most tables, this is the only index you really need. It is a unique index because all values in the domain must be unique.

As a general rule, consider indexing a table's foreign key constraints.

Avoid an extra index in the table that you will update frequently, unless it is applied in the above case.

If the table has a PRIMARY key constraint, consider indexing the second field only when you are working on a large amount of data that you intend to search or categorize frequently through the domain, or where most of the domain contains unique values.

In short, indexing any domain you want to categorize, search, or join other tables can improve the speed at which your task is completed. Just keep in mind that each index increases the size of the database, and too much indexing slows everything down. If you are dealing with data that is small to moderate, then indexes other than primary key constraints are usually unnecessary.

The last word about indexing: Do not use indexes to classify. This is not what they are used for, and you may not be able to get the results you need.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.