Cloud SQL for MySQL now lets you have more control over the number of results
Share
Services
## Feature
Feature
Cloud SQL for MySQL now lets you have more control over the number of results that are returned when you perform an ANN vector search with filters. You can use iterative filtering when the selective filters of the`WHERE` clause in your ANN search query produce fewer results than the number of results specified in your `LIMIT` clause.
To enable iterative filtering for your ANN search query, set the`cloudsql_vector_iterative_filtering` flag to `ON`. You can set the flag at a session or global level.
To enable and use iterative filtering for your ANN search query, you must have[\[MYSQL\_$VERSION\].R20251004.01\_07](https://docs.cloud.google.com/sql/docs/mysql/maintenance-changelog/)or later installed on your MySQL instance.
For more information, see [Search approximate nearest neighbors (ANN)](https://docs.cloud.google.com/sql/docs/mysql/search-filter-vector-embeddings#ann).