Indexes-opracowanie

Nasza ocena:

3
Wyświetleń: 497
Komentarze: 0
Notatek.pl

Pobierz ten dokument za darmo

Podgląd dokumentu
Indexes-opracowanie - strona 1

Fragment notatki:

Indexes
The MEMORY storage engine supports both HASH and BTREE indexes. You can specify one or the other
for a given index by adding a USING clause as shown here:
CREATE TABLE lookup
(id INT, INDEX USING HASH (id))
ENGINE = MEMORY;
CREATE TABLE lookup
(id INT, INDEX USING BTREE (id))
ENGINE = MEMORY;
For general characteristics of B-tree and hash indexes, see Section 8.3.1, “How MySQL Uses
Indexes”.
MEMORY tables can have up to 64 indexes per table, 16 columns per index and a maximum key length
of 3072 bytes.
If a MEMORY table hash index has a high degree of key duplication (many index entries containing the
same value), updates to the table that affect key values and all deletes are significantly slower. The
degree of this slowdown is proportional to the degree of duplication (or, inversely proportional to the
index cardinality). You can use a BTREE index to avoid this problem.
MEMORY tables can have nonunique keys. (This is an uncommon feature for implementations of hash
indexes.)
Columns that are indexed can contain NULL values.
... zobacz całą notatkę



Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz