Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A compound index method and device

A compound index and key-value technology, applied in the computer field, can solve the problems of increasing the complexity of the Hash table structure and space overhead, different sizes, and low efficiency

Active Publication Date: 2018-03-16
HUAWEI TECH CO LTD
View PDF3 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0010] Cuckoo hash has the following problems as a database composite index: 1. Cuckoo hash needs to calculate the hash function multiple times and traverse multiple data items in the hash bucket at the same time; 2. The key of the database composite index is a combination of multiple attributes, and each combination Different types and sizes will greatly increase the structural complexity and space overhead of the Hash table
Therefore, the current compound index scheme of cuckoo hash is inefficient

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A compound index method and device
  • A compound index method and device
  • A compound index method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0078] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments . Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0079] The embodiment of the present invention provides a compound index method, such as Figure 1A shown, including:

[0080] 101A: Obtain the key value to be detected, perform hash calculation on the key value to be detected, and obtain the combined hash code; shift the combined hash code to the right to obtain the label of the key value to be detected;

[0081] 102A: Copy and vectorize the label of the key value to be detected based on ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

An embodiment of the invention discloses a composite index method and a device. The method is implemented by the following steps of obtaining to-be-detected keys and carrying out Hash computation on the to-be-detected keys to obtain combined Hash codes; moving the combined Hash codes a set bit to the right to obtain labels of the to-be-detected keys; carrying out copy and vectorization processing on the labels of the to-be-detected keys with a bit wide of single-instruction multiple-data stream as reference so as to obtain label vectors of the to-be-detected keys; comparing index key vectors with the label vectors of the to-be-detected keys by group through a comparison order of the single-instruction multiple-data stream; and determining whether detection is successful according to the comparison result, and returning tuple objects in index addresses of the to-be-detected keys if detection is successful. A plurality of data items can be compared at each time through parallel detection based on SIMD (Single Instruction Multiple Data), so that the performance cost brought by searching loop is reduced and multiple computations of a Hash function are avoided; the labels of the to-be-detected keys belong to Cuckoo Hashing of partial keys and can be used for reducing the space cost of a Hash table.

Description

technical field [0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a compound index method and device. Background technique [0002] Composite index, also called combined index, is a fast query mechanism provided by most relational database systems, allowing users to create indexes on multiple columns, such as: [0003] create index ComIdx on tableX(col1,col2,col3); [0004] Such indexes are usually implemented based on traditional chained Hash (hash) structures. Chained Hash uses a linked list to deal with the Hash collision problem. However, if the hash function is not properly selected or the data is skewed, the linked list will be too long. On the one hand, it will cause a lot of space waste, and on the other hand, it will degenerate the O(1) level Hash search In order to search in O(n) order. [0005] In 2001, a new Hash conflict processing technology was proposed: Cuckoo Hashing (cuckoo hash) technology, ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F17/30
CPCG06F16/2255G06F16/2272G06F16/284
Inventor 周开来孙辉赵素云孙东旺
Owner HUAWEI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products