Functions of Indexes

Source: Internet
Author: User
The function of an index is to query the data in a field after an index is created for a field, which is more efficient, that is, faster,
For example
Create index ABC on Stu (AGE );
If an index is created for the age field of the Stu table, select * from Stu where age> 10 during query;
In this case, the efficiency is high, mainly reflected in the where statement, where age> 10. Age is used as the query condition, and the age is indexed.

The index allows the database program to find the required data without scanning the entire table. That is, when querying, the system first searches for the index and finds the Data Pointer, and then directly locates the data through the pointer, so it is fast.

Disadvantages:
Note that the index query efficiency is high. However, when data is inserted or updated in a table, additional operations are performed to maintain the index. Therefore, other operations are less efficient, it also occupies storage space, and does not create too many indexes. Too many indexes are counterproductive!
Related Article

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.