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

Composite index method and device

A compound index and key-value technology, applied in the computer field, can solve problems such as low efficiency, variable size, increased complexity of Hash table structure and space overhead, etc.

Active Publication Date: 2015-04-22
HUAWEI TECH CO LTD
View PDF3 Cites 16 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
  • Composite index method and device
  • Composite index method and device
  • Composite index method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0078] In order to make the purpose, technical scheme and advantages of the present invention clearer, the following will combine Attached picture The present invention is further described in detail, obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the 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, Figure 1 As shown in A, 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 t...

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
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