Database Interview Series four: index

Source: Internet
Author: User
Preface: The Project encountered a problem: write a Web page used to read the background of the data in front of the display, each page is a long time to display the data, and then the where condition of the field to increase the index, the data display speed significantly faster.

index : In a relational database, an index is a single, physical storage structure that sorts the values of one or more columns in a database table, a collection of one or more column values in a table, and a logical pointer list corresponding to the data pages that physically identify those values in the table. The index acts as a catalog of books, and you can quickly find what you need based on the pages in your catalog.

Advantages 1. Greatly accelerate the retrieval speed of data; 2. Create a unique index that guarantees the uniqueness of each row of data in a database table; 3. Accelerates the connection between tables and tables; 4. When you use grouping and sort clauses for data retrieval, you can significantly reduce the time to group and sort in queries. Disadvantage 1. The index needs to occupy physical space. 2. When the data in the table is added, deleted and modified, the index is also maintained dynamically, reducing the maintenance speed of the data. Index: Normal index, unique index, primary key index, aggregate index when creating a table if primary KEY constraints are set to automatically establish a primary key index, the unique constraint automatically creates a single index

Database Interview Series four: index

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.