A technical post published on 20 November by the ApsaraDB team argues that a conventional retrieval-augmented generation pipeline needs six moving parts, namely an embedding service, a vector database, synchronisation jobs, a rerank service, LLM orchestration and the original business database, plus three copies of the data. PolarDB-X, the vendor's distributed MySQL-compatible database, now carries a VECTOR(1024) column type backed by an HNSW index and a set of SQL functions, AI_EMBEDDING, AI_RANK, AI_PROMPT, AI_CLASSIFY and AI_EXTRACT, built into both standard and enterprise editions rather than sold as plugins. The post shows a generated column that derives the vector from stored text so no triggers are needed, batched embedding through an UPDATE limited to rows whose embedding is still null, a two-stage retrieval query that recalls 20 candidates by vector distance and reranks them to five, and a single statement that assembles context and calls the model. It also flags a pitfall around concatenating retrieved passages with GROUP_CONCAT.
Our takeRemoving five services removes the consistency problem those synchronisation jobs create, and that is a genuine cost rather than a cosmetic one. The trade-off moves into the database's own scheduling: a rerank or generation call issued inside a SQL statement holds a connection open for the length of an external request, so throughput ends up bounded by connection-pool sizing instead of by the model endpoint. The post is a walkthrough, not an evaluation; it gives no latency, recall or cost comparison against the six-component stack it replaces.