> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/optimization-and-indexes.md).

# Optimization and Indexes

{% columns %}
{% column %}
{% content-ref url="/pages/SW2M8Gw3NSDeCRVp40O7" %}
[Building the best INDEX for a given SELECT](/docs/server/ha-and-performance/optimization-and-tuning/optimization-and-indexes/building-the-best-index-for-a-given-select.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
A cookbook for designing the best index for a given SELECT query.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/ofYVbnRHgBMJmnzvIfpr" %}
[Compound (Composite) Indexes](/docs/server/ha-and-performance/optimization-and-tuning/optimization-and-indexes/compound-composite-indexes.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
How compound (composite) indexes work in MariaDB and how to design them effectively.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/s7G7oAw0WCBDm4vAFdjw" %}
[Foreign Keys](/docs/server/ha-and-performance/optimization-and-tuning/optimization-and-indexes/foreign-keys.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Complete MariaDB performance optimization guide. Complete reference for query tuning, indexing strategies, and configuration improvements for production use.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/4eGvuO0KbVr3nY5vXaU0" %}
[Ignored Indexes](/docs/server/ha-and-performance/optimization-and-tuning/optimization-and-indexes/ignored-indexes.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Ignored indexes allow indexes to be visible and maintained without being used by the optimizer. This feature is comparable to MySQL 8’s "invisible indexes."
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/wP67t8LXTr0rWQngXadb" %}
[Index Statistics](/docs/server/ha-and-performance/optimization-and-tuning/optimization-and-indexes/index-statistics.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Index statistics provide crucial insights to the MariaDB query optimizer, guiding it in executing queries efficiently. Up-to-date index statistics ensure optimized query performance.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/2cU5G1yp7qFuGdUzmbyW" %}
[Latitude/Longitude Indexing](/docs/server/ha-and-performance/optimization-and-tuning/optimization-and-indexes/latitudelongitude-indexing.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Techniques for indexing latitude/longitude data to speed up nearest-location queries.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/vsc32MrKnBtclcjLSi94" %}
[Primary Keys with Nullable Columns](/docs/server/ha-and-performance/optimization-and-tuning/optimization-and-indexes/primary-keys-with-nullable-columns.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
How MariaDB handles primary keys over nullable columns, following the SQL standard.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/PXYobBfQLxrE3KBebZbV" %}
[Storage Engine Index Types](/docs/server/ha-and-performance/optimization-and-tuning/optimization-and-indexes/storage-engine-index-types.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
The index types available when creating an index: BTREE, HASH, and RTREE.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/caD1RA4v4n31Dr2wj5cz" %}
[Full-Text Indexes](/docs/server/ha-and-performance/optimization-and-tuning/optimization-and-indexes/full-text-indexes.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Implement full-text indexes in MariaDB Server for efficient text search. This section guides you through creating and utilizing these indexes to optimize queries on large text datasets.
{% endcolumn %}
{% endcolumns %}
