Index: How to quickly find a particular data in massive data?

Index: How to quickly find a particular data in massive data?

MySQL is so dependent on the underlying data structure B + tree, such index Key-Value database similar Redis is how to achieve it? What is the underlying data structure dependent on it?

Why Index

How to save storage space, how to improve the efficiency of the data additions and deletions to change search, the focus has become the design, it is important that the index, the equivalent of directory data, through the directory, you can quickly locate relevant knowledge of the number of pages

Requirements definition index

System requirements for the design, analysis from functional requirements and non-functional requirements

1-functional requirements

The data is formatted or unformatted data data? To build the index of the original data, there are many types, one is structured data, such as data MySQL, one is unstructured data, pre-processing needs to be done, the extracted query keywords, build an index of keywords

The data is static data or dynamic data? When the dynamic data to build the index, not only need to consider the query efficiency index, while the original data updated dynamically update the index

Index is stored in memory or hard disk?

Find a single value or range to find? Find a single value is based on a value equal to the data query keywords, the so-called interval is to find keywords to find value in a range of all the data

Single or multiple keywords to find the combination of keywords to find? Search engines index construction, that is, to support a keyword combination keywords to find the find should support

2 non-functional requirements

Whether it is stored in memory or on disk, the index consumes storage space is not too large

Indexing commonly used data structures what?

Hash table, the red-black trees, jump table, B + tree, bitmap, bloom filter

Index index, the role is to assist the Find

There is room for a data structure of bit range, Uber et

Published 75 original articles · won praise 9 · views 9165

Guess you like

Origin blog.csdn.net/ywangjiyl/article/details/104893024