26 Kasım 2021 Cuma

MariaDB IGNORED INDEX

IGNORED INDEX
Bu MariaDB'ye mahsus bir özellik. Mevcut bir Index'i DROP etmeden devre dışı bırakmak isteyebiliriz. Böylece Index'in ne kadar etkili olduğu ölçülebilir. Açıklaması şöyle
IGNORED indexes are visible and maintained, but are not used by the optimizer. (MySQL 8 has a similar feature which they call “invisible indexes”.)
Açıklaması şöyle
The optimizer treats IGNORED indexes as if they don’t exist. They are not used in the query plans, or as a source of statistical information.

An attempt to use an IGNORED index with a USE INDEX or FORCE INDEX throws an error 1176 (ER_KEY_DOES_NOT_EXISTS), which indicates that the index doesn’t exist.

Mevcut Index
Açıklaması şöyle
The  IGNORED index option can be used with existing indexes or can be used when creating a new index.
Örnek
Şöyle yaparız
ALTER TABLE sbtest9 ALTER INDEX k_9 IGNORED;
Tekrar devreye almak için şöyle yaparız
ALTER TABLE sbtest9 ALTER INDEX k_9 NOT GNORED;


Hiç yorum yok:

Yorum Gönder

Soft Delete

Giriş Açıklaması  şöyle When using the soft delete mechanism on the database, you might run into a situation where a record with a unique co...