This topic describes some common issues that may occur when using OceanBase AI Database, along with their causes and solutions.
Hybrid search
How much overhead does reranking incur when calling an external model?
Factors that affect reranking overhead include model size, request parameters, and network latency. Use Query Profile to analyze the overhead.
Execute a hybrid search SQL statement with the
/*+monitor*/hint:SELECT /*+ monitor */ content FROM HYBRID_SEARCH( TABLE doc_table, '{ "knn": { "field": "vector", "k": 3, "query_vector": "[1, 2, 3]" }, "rerank" : { "model": "aliyun-dashscope/gte-rerank-v2", "field": "content", "query": "oceanbase mysql", "rank_window_size": 3 }, "size": 3 }');Execute the Profile command to view the detailed structure and statistics of physical operators during execution:
SELECT DBMS_XPROFILE.DISPLAY_PROFILE();
Pay special attention to the following Profile information:
rerank document: The number of documents participating in reranking.rerank api call: The actual number of API calls made by the reranking model (related tobatch_sizeandrank_window_size).rerank elapse: The total time consumed in the reranking process.rerank http elapse: The actual time consumed by the Rerank API for HTTP requests.
This information helps you evaluate the resource usage and latency of external model calls during reranking.
Parallel execution of full-text/scalar queries
Will setting query_dop very high (e.g., 128) definitely make it faster?
Not necessarily. The actual degree of parallelism is limited by the tenant thread pool capacity, data scale, and scheduling overhead. An excessively large query_dop can cause queuing when threads are scarce, which may instead increase the long-tail response time. Start with a degree of parallelism of 2 or 4, observe the performance gains, and then tune the value as needed.
How do I verify whether a specific query uses parallel execution?
You can observe the actual degree of parallelism of a query in Query Profile. The steps are as follows:
Execute your hybrid search query, for example:
SELECT tid, __score FROM HYBRID_SEARCH(TABLE passages_test, @q);View the Profile information of the SQL statement just executed (by default, using the most recent
trace_id):SELECT DBMS_XPROFILE.DISPLAY_PROFILE();You can also explicitly specify
trace_idto view a particular query:SELECT DBMS_XPROFILE.DISPLAY_PROFILE('<trace_id>');DBMS_XPROFILE.DISPLAY_PROFILEis used to display performance analysis data for SQL execution plans. For more information, see DBMS_XPROFILE.Determine whether parallel execution actually occurs and what the degree of concurrency is:
Parallel execution: The
Fusion Iternode in the profile containsparallel task count:N, followed by NTasksubtrees. EachTaskrepresents a parallel worker thread, and N is the actual degree of parallelism.Fusion Iter parallel task count:4 Task Search Driver Iter ... Task Search Driver Iter ... ...Serial execution: The
Fusion Iternode does not contain theparallel task countfield or any nestedTasknodes. Each subquery path is directly attached toFusion Iter.Fusion Iter Vector Iter ... Search Driver Iter ...
Vector search
In which mode is vector search supported?
OceanBase's MySQL-compatible mode supports vector search. Oracle-compatible mode does not support it yet.
Must the data dimensions be the same for each row in a vector column?
They must be the same. The dimension must be specified when defining the vector column, and the dimension is also validated when writing vector data.
What is the maximum number of rows of vector data that can be written?
There is no fixed row-count limit. The actual capacity depends on the tenant's memory resources.
How do I create an index on vectors with more than 4,096 dimensions?
Reduce the dimensionality of the vectors to no more than 4,096 dimensions before creating the index.
Semantic indexes
What are the requirements for cross-modal queries (searching images by text)?
You must use a VL (multimodal) embedding model whose text and image outputs are in the same vector space. Otherwise, an error occurs at runtime. For details, see Semantic index.
Why do image semantic indexes not support immediate mode?
Image embedding requires downloading an image from its URL and invoking a multimodal model. A request typically takes several seconds, much longer than text embedding. Synchronous execution in the DML path would block INSERT or UPDATE operations for a long time and severely affect write performance. For image scenarios, use async or manual mode.
