From the course: Advanced SQL for Data Scientists
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Hash indexes
- [Instructor] Now a third type of index is the hash index. Now hash indexes use hash functions. Now hash functions are mappings of arbitrary linked data into a fixed-size string. Now hash values are virtually unique and the hash value is a function of the input, of course. So even slight changes in inputs will produce a new hash. So for example, if you're hashing a string and you add a space at the end, that would give you a totally different hash than the one you had originally. And here's some examples. So some things to consider. The size of the hash value depends on the algorithm used. So that's typically determined by the database management system designers. There's no ordering or preserving with hash functions so they could appear in just any random order, and similar inputs, again, can have vastly different outputs so you can't make any assumptions about the value that a hash function generates other than it's…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.