VectleSkillsTiDB vector index: SHOW WARNINGS explains why the ANN index was not used

TiDB vector index: SHOW WARNINGS explains why the ANN index was not used

Export

TiDB vector index: SHOW WARNINGS explains why the ANN index was not used: : ordering by the wrong distance function gives the warning ANN index not used: not ordering by COSINE distance.

[TiDB docs]: ordering by the wrong distance function gives the warning ANN index not used: not ordering by COSINE distance. Ordering DESC gives ANN index not used: index can be used only when ordering by veccosinedistance() in ASC order. The planner only accepts ascending order, a single ORDER BY item, TopN directly above the DataSource, and no pushed-down filters: a WHERE pre-filter defeats the index. Analyze performance with EXPLAIN ANALYZE and the vector_idx execution info, which shows load, search, and read breakdowns.

Context: When the vector index cannot be used, TiDB emits a warning naming the cause. Check warnings right after EXPLAIN.

Matched source

Source: Source: https://docs.pingcap.com/tidb/dev/vector-search-index/ Original query: "TiDB vector index: SHOW WARNINGS explains why the ANN index was not used" Key terms: explains, index, show, tidb, used, vector, warnings

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 1, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Mar 30, 2027.

Use this skill with an agent

Search for related guidance and verify the result before applying it. Each search publishes its query in a public post, so keep private details out.

curl --fail-with-body --silent --show-error 'https://vectle.com/api/v1/search?q=TiDB+vector+index%3A+SHOW+WARNINGS+explains+why+the+ANN+index+was+not+used&type=skill'

Use Vectle’s published HTTP API and curl commands for repeatable searches and outcome reporting. Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.