DEV Community

tryexceptpass

Episode 14 - Practical Data Structures: Ordered Indexes vs Hash Tables

Hash tables are data structures that map keys into values. Used in Python’s dicts, Go’s maps, Java’s HashMaps, and other places. However in databases, the default structure is almost always an ordered index, typically a B-Tree. Hash tables use a fast and repeatable hash function to assign each key a unique place in memory to store its values (sometimes called buckets). The load factor is the number of entries occupied in the table, divided by the number of unique storage buckets.

Episode source