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 Rerank re-ranking incur when calling an external model?
When Rerank re-ranking calls an external AI model, the overall overhead is mainly affected by the following factors: model size, request parameters, network latency, and so on. It is recommended to use the Profile tool for detailed overhead analysis.
Execute the 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 }');Run 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 to the rerank model, which is related to
batch_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.
Using the above methods, you can directly evaluate the resource and time consumption generated by calling the external model during the Rerank re-ranking phase.
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's thread pool capacity, data scale, and scheduling overhead. An excessively high query_dop may cause queuing when threads are scarce, which may instead increase the long-tail response time. It is recommended to start with 2 or 4 and observe the benefits before tuning.
How can I verify that a query actually ran in parallel?
You can observe the actual degree of parallelism of a query through Query Profile. The specific 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();Alternatively, you can explicitly specify
trace_idto view a particular query:SELECT DBMS_XPROFILE.DISPLAY_PROFILE('<trace_id>');DBMS_XPROFILE.DISPLAY_PROFILEis used to display the performance analysis data of SQL execution plans. For more information, see DISPLAY_PROFILE.Determine whether parallel execution actually occurs and what the degree of concurrency is:
Parallel execution: Under the
Fusion Iternode in the profile, you will seeparallel task count:N, which is nested with NTasksubtrees. Each Task represents a parallel worker thread, and N is the actual degree of parallelism. When adaptive degree of parallelism is enabled, you can also pay attention to information such asauto dop targetandauto dop actual. For meanings, see DISPLAY_PROFILE.Fusion Iter parallel task count:4 Task Search Driver Iter ... Task Search Driver Iter ... ...Serial execution: There is no
parallel task countfield underFusion Iter, nor is there anyTasknesting. Each subquery path is directly attached underFusion Iter.Fusion Iter Vector Iter ... Search Driver Iter ...
Vector search
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 verified when writing vector data.
What is the maximum number of rows of vector data that can be written?
There is no limit; it depends on the tenant's memory resources.
How do I index a vector exceeding 4096 dimensions?
The data needs to be compressed to within 4096 dimensions before indexing.
Semantic index
What are the requirements for cross-modal queries (searching images by text)?
You must use a VL (multimodal) Embedding model, and the text and image outputs must be in the same vector space; otherwise, an error will occur during runtime. For details, see Semantic search.
Why does the image semantic index not support the immediate mode?
Image Embedding requires downloading the URL from the network and invoking the multimodal model, typically resulting in a latency of several seconds per request, which is much higher than text Embedding. Synchronous execution within DML paths would block INSERT/UPDATE operations for a long time, severely impacting write performance. For image scenarios, use the async or manual mode.