1, which greatly speeds up data retrieval;
2. Create a unique index to ensure the uniqueness of each row of data in the database table;
3. Accelerate the connection between instruments;
4. When using grouping and sorting clauses for data retrieval, the time of grouping and sorting in the query can be significantly reduced.
Disadvantages:
1, the index needs to occupy physical space.
2. When adding, deleting and modifying the data in the table, the index should also be maintained dynamically, which reduces the speed of data maintenance.
Extended data:
Development history:
The index first appeared in the west, mainly the index of medieval European religious works. After18th century, subject index began to appear in the west, and by the end of19th, content analysis index was widely used. China's index appeared late. Generally speaking, The Rhyme of Names in the Han Dynasty compiled by Fu Shan in the late Ming Dynasty is the earliest existing index of names. During the period of Ganjia in Qing Dynasty, Zhang Xuecheng advocated compiling a comprehensive index of group books.
In the 1920s, with the introduction of western indexing theory and technology, China's modern indexing and research flourished. Qian Yaxin published index and index law in 1930, and Hongye published an introduction in 1932, which indicated that modern index theory and technology with China characteristics had developed rapidly.
In 1950s, computer technology was applied to index compilation. Since then, a large number of machine-compiled indexes have appeared, which has made profound changes in the theory, technology and form of index carriers.
There is no index in SQL standard, but commercial relational database management systems generally support index mechanism, but different relational database management systems support different index types.
Index has become a very important part of relational database. They are used as table pointers containing data of interest. Through the index, you can find specific records directly from the table, without having to scan the table sequentially and find them one by one. For large tables, an index is necessary. If there is no index, it will take hours or even days to get the results, not seconds.