cd /news/ai-infrastructure/oceanbase-vsag-index-solving-mybatis… · home topics ai-infrastructure article
[ARTICLE · art-71169] src=promptcube3.com ↗ pub= topic=ai-infrastructure verified=true sentiment=↓ negative

OceanBase VSAG Index: Solving MyBatis Batch Insert Timeouts

OceanBase 4.3.3's VSAG vector index causes transaction timeouts during MyBatis batch inserts of 1536-dimensional embedding vectors, with a batch size of 200 consistently failing even after increasing query and transaction timeouts to 120 seconds. Dropping the VSAG index allows the same 50,000-record payload to complete in seconds, indicating synchronous graph-based index maintenance is holding locks too long. The user seeks asynchronous or deferred index build options to decouple graph construction from transaction commits.

read1 min views1 publishedJul 23, 2026
OceanBase VSAG Index: Solving MyBatis Batch Insert Timeouts
Image: Promptcube3 (auto-discovered)

saveBatch

with a batch size of 200 is triggering consistent transaction timeouts in OceanBase 4.3.3 when writing 1536-dimensional embedding vectors. The failure is specific to tables where a VSAG vector index is active.The error is explicit:

JDBC SQLState: XA102, Error Code: 4012 - Transaction timeout or statement timeout exceeded

After running some tests, the bottleneck is definitely the index. If I drop the VSAG index, the same 50,000 record payload finishes in seconds. Even after cranking ob_query_timeout

and ob_trx_timeout

to 120s+, the batches still crash. It looks like the synchronous overhead of maintaining the graph-based index during the write is holding locks too long, causing a pile-up.

I'm trying to figure out if there is a way to handle this via a more efficient AI workflow for data ingestion. Specifically, I need to know if OceanBase supports asynchronous VSAG index maintenance or a deferred build mode to prevent these synchronous blocks during high-throughput inserts.

For anyone else doing a deep dive into OceanBase vector deployment, here is my current setup:

Database: OceanBase 4.3.3 (MySQL mode)Table Config: Hash partitionedIndex: Native VSAG onvector_data

(1536-dim)Framework: Spring Boot + MyBatis-Plus

If you've found a specific session variable to decouple the graph construction from the transaction commit, or a better batch tuning pattern for vector data, I'd appreciate the lead.

Next Competiflow: Automating Competitor Intelligence →

── more in #ai-infrastructure 4 stories · sorted by recency
── more on @oceanbase 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/oceanbase-vsag-index…] indexed:0 read:1min 2026-07-23 ·