This paper explains the principle and implementation of consistent hash

Why do I need a consistent hashFirst, what is hashHash, generally translated as hash, or transliterated as hash, is to transform an input of any length (also known as pre mapping pre image) into a fixed length output through hash algorithm, and the output is the hash value. This transformation is a compression mapping, that is, the hash value s ...

Posted by smithmr8 on Mon, 29 Nov 2021 17:53:20 -0800

postgreSQL source code analysis -- establishment and use of index -- Hash index

2021SC@SDUSC catalogue Hash index In addition to using B-Tree index, postgreSQL can also use hash index. Hash index has faster query speed. This article mainly explains the principle of hash index, compares it with B-Tree, and analyzes the relevant data structure of hash index in the source code. Hash indexing principle Hash table The ...

Posted by incubi on Sun, 28 Nov 2021 18:57:01 -0800

PAT Basic Level 1080 MOOC final grade problem solving ideas and AC code v1.0

1. Topic description and online test location 1.1 the input is the user name and its score. Since the score includes three parts: online, midterm and end of the period, the input data of the same user name may contain multiple entries; The calculation rule of the final score is: on the premise that the online score is no less than 200, if ...

Posted by mrphobos on Fri, 19 Nov 2021 08:37:49 -0800