1Z0-184-25 Question 45
Single answerYou have stored millions of product image embeddings in a MySQL HeatWave instance on Oracle Cloud Infrastructure to power an AI-driven recommendation application. The team needs sub-second similarity search results based on these vector embeddings. Which approach will best optimize vector queries for approximate nearest neighbor (ANN) searches?
- A
Use a standard B-tree index on the vector column and rely on the query optimizer to handle approximate matching.
- B
Create a specialized vector index that matches the embedding dimension and data type, then leverage approximate nearest neighbor features in MySQL HeatWave.
- C
Rely on a composite index that combines the vector column with a primary key for faster lookups and approximate matching.
- D
Store the embeddings in a text column and use a full-text search index to approximate nearest neighbor results.
Show answer and explanation
Correct answer: B
Explanation
When dealing with high-dimensional embeddings, a dedicated vector index is essential to handle approximate nearest neighbor queries efficiently. MySQL HeatWave supports vector indexes that enable optimized similarity searches on large-scale embeddings. Refer to the official MySQL HeatWave documentation (https://docs.oracle.com/en/mysql/) for best practices on creating and tuning vector indexes to achieve optimal performance.
- A. Incorrect.
Option 1 is incorrect because a B-tree index works well for scalar comparisons but is not designed for multidimensional vector data. It will not effectively speed up approximate nearest neighbor vector searches.
- B. Correct.
Option 2 is correct because creating a specialized vector index aligned with your embedding size and using MySQL HeatWave� approximate nearest neighbor features enables efficient vector similarity searches. This approach is specifically designed for similarity search in high-dimensional data.
- C. Incorrect.
Option 3 is incorrect because a composite index combining the vector column with a primary key does not address the inherent multidimensional nature of vector data. It may optimize lookups of specific keys, but not approximate nearest neighbor searches.
- D. Incorrect.
Option 4 is incorrect because using a text column and a full-text index is not intended for vector-based similarity. Full-text indexes are meant for keyword matching rather than distance-based vector searches.