Database Reference
In-Depth Information
Bucket 1
Index
Key 1
Index
Key 2
Index
Key 3
Hash Function
Bucket 2
Bucket 3
Each element in the array is known as a hash bucket. The key column of each row
has a hash function applied to it, and the result of the function is used to decide
which bucket a row is placed in. The hash function will be deterministic; the same
index key will always map to the same hash index container and are linked together
in a chain. When a row is inserted in the memory-optimized table, a hash function is
applied to the index key value for the row.
When you create a hash index, you have to specify the number of buckets to create
in the create table statement. Microsoft recommends that you choose a number
greater than the number of the expected unique values of the index key column, so
there is a greater chance that each bucket only has rows with a single value in its
chain. It is also advised not to make the number of buckets too large as each bucket
will use up memory. For details on the best practices to determine the number of
buckets, please refer to the following MSDN article:
http://msdn.microsoft.com/en-us/library/dn494956(v=sql.120).aspx
 
Search WWH ::




Custom Search