> For the complete documentation index, see [llms.txt](https://docs.percona.com/percona-server/8.4/llms.txt).

# Prefix index queries optimization

*Percona Server for MySQL* has ported Prefix Index Queries Optimization feature from Facebook patch for *MySQL*.

Prior to this *InnoDB* would always fetch the clustered index for all prefix columns in an index, even when the value of a particular record was smaller than the prefix length. This implementation optimizes that case to use the record from the secondary index and avoid the extra lookup.

## Status variables

### `Innodb_secondary_index_triggered_cluster_reads`

| Option     | Description |
| ---------- | ----------- |
| Scope:     | Global      |
| Data type: | Numeric     |

This variable shows the number of times secondary index lookup triggered cluster lookup.

### `Innodb_secondary_index_triggered_cluster_reads_avoided`

| Option     | Description |
| ---------- | ----------- |
| Scope:     | Global      |
| Data type: | Numeric     |

This variable shows the number of times prefix optimization avoided triggering cluster lookup.
