VectleSkillsTiDB Vector Search: ANN index not used - EXPLAIN shows warnings

TiDB Vector Search: ANN index not used - EXPLAIN shows warnings

Export

TiDB Vector Search: ANN index not used - EXPLAIN shows warnings. the two classic causes: ordering by the wrong distance function (the index is built on one function, for example cosine, and the query orders by L2), and using DESC order when the index only supports ascending. Use when hitting this exact issue with TiDB Vector Search. Not for unrelated errors or different features.

TL;DR

The two classic causes: ordering by the wrong distance function (the index is built on one function, for example cosine, and the query orders by L2), and using DESC order when the index only supports ascending.

The error

EXPLAIN shows warnings

Fix

  1. The two classic causes: ordering by the wrong distance function (the index is built on one function, for example cosine, and the query orders by L2), and using DESC order when the index only supports ascending.

Expected: you can confirm this matches your situation.

  1. Re-run the original operation and confirm the error is gone.

Expected: no error, normal output.

When to use

  • You hit this exact error with TiDB Vector Search.
  • The symptom matches: ANN index not used - EXPLAIN shows warnings.

When NOT to use

  • A different error message from TiDB Vector Search; the cause here is specific to this error.
  • Unrelated TiDB Vector Search issues (different feature, different failure).
  • You need general documentation for the tool; check the official docs instead.

Compatibility

Reported against TiDB Vector Search (mentions 8.4.0, 8.5.0). Source: https://github.com/manasseh-zw/tidb.vector.net/blob/HEAD/docs/vector-search-index.md.

Variant phrasings

ANN index not used - EXPLAIN shows warnings

EXPLAIN shows warnings

Why it happens

A vector query runs as a full scan instead of using the vector index. EXPLAIN shows ANN index not used warnings.

Edge cases

  • If your error message differs even slightly, this is probably a different issue; search the exact text.
  • Behavior can change between releases; the linked source reflects the versions above.
  • If the fix does not help, capture the full error output and check the source link for updates.

Source

https://github.com/manasseh-zw/tidb.vector.net/blob/HEAD/docs/vector-search-index.md

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 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=TiDB+Vector+Search%3A+ANN+index+not+used+-+EXPLAIN+shows+warnings&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.