PolarDB-X AI Assistant

Updated at:
Copy as MD

The PolarDB-X AI Assistant is an intelligent operations and maintenance (O&M) tool for PolarDB-X. Powered by large language models (LLMs) and an expert knowledge base for distributed databases, it integrates four core capabilities: intelligent Q&A, intelligent diagnosis, intelligent inspection, and Skill invocation. The AI Assistant supports natural language interaction and has a deep understanding of the PolarDB-X distributed architecture, enabling it to perform root cause analysis for multi-node performance issues and provide suggestions for sharding optimization, SQL routing analysis, and elastic scaling. Based on Resource Access Management (RAM) access control, the AI Assistant ensures the security of instances and data while delivering intelligent O&M. This significantly lowers the barrier to entry and reduces the operational complexity of distributed databases, helping you achieve efficient troubleshooting and large-scale cluster management.

Core capabilities

Intelligent Q&A

Use natural language to query data, topology information, and performance metrics across multiple instances for bulk retrieval and diagnosis.

Intelligent Diagnosis

Access the AI Assistant on pages such as Slow SQL Statements, Deadlock Analysis, and Performance Trend. It provides instant root cause diagnosis and optimization suggestions by combining distributed execution plans with contextual information.

Intelligent Inspection

Performs one-click health checks on all instances under your account. It inspects operational status, backup configurations, security settings, and high availability and disaster recovery capabilities to quickly identify potential risks and configuration issues.

Skill invocation integration

Integrate with AI coding assistants and IDEs to call intelligent O&M capabilities for distributed databases directly in your development workflow without switching to the console.

Access the AI Assistant

  • Log on to the PolarDB-X console. On the Instances page, click the image icon in the right-side panel to open the chat interface.

  • Other entry points: PolarDB-X also embeds the AI Assistant on various feature pages:

    Feature page

    Example

    Slow SQL Statements: On the Diagnostics and Optimization > Slow Query Logs page of a target instance, you can analyze slow SQL queries from a specific time range.

    On the Slow Query Logs page, click the PolarDB-X AI Analysis tab to intelligently analyze slow SQL queries.

    Deadlock Analysis: On the Diagnostics and Optimization > Deadlock Analysis page of a target instance, you can analyze deadlocks from a specific time range.

    On this page, click Diagnose Now to start a deadlock diagnosis, or click PolarDB-X AI Analysis for an AI-powered analysis.

    Performance Trend: On the Diagnostics and Optimization > Performance Trend page of a target instance, you can analyze metrics such as CPU utilization, memory utilization, active sessions, and request response time within a specific time range.

    At the top of the page, select the Compute Node or Data Node tab, specify the node type and data granularity, such as 5 seconds, and then click PolarDB-X AI Analysis to start the analysis.

Note

To access this feature, a RAM user must have read-only permissions for PolarDB-X (AliyunDRDSReadOnlyAccess) and the AliyunYaoChiAgentAccess permission. For information about how to grant permissions, see Authorize a RAM user.

AI Assistant capabilities

The PolarDB-X AI Assistant covers the following professional skill domains, providing comprehensive support for distributed database O&M scenarios, from performance optimization to migration assessment.

Skill domain

Core capability

Typical scenarios

Troubleshooting

Root cause and event analysis

Diagnose logs (error logs/slow queries) and troubleshoot connection and session anomalies to quickly identify the root cause and assess the impact.

Performance optimization

Instance performance diagnosis

Monitors CPU, memory, storage, and IOPS utilization, analyzes performance bottlenecks, and identifies slow SQL queries to provide optimization suggestions.

Capacity management

Storage and resource planning

Analyze storage space usage trends, predict growth, and assess resource scaling needs to prevent capacity shortages.

Risk governance

Version security and risk alerts

  • Identify high-risk vulnerabilities in kernel versions and assess the urgency of upgrades.

  • Check for anomalies in instance running status, version, and billing to provide proactive warnings.

Backup and recovery

Backup policy and disaster recovery assessment

  • Evaluate the effectiveness and success rate of your backup policies.

  • Check the instance's high-availability configuration and disaster recovery capabilities to ensure business continuity.

Security and compliance

Access control and audit

Verify IP address whitelist configurations, account permissions, SSL/TDE encryption status, and audit log integrity to ensure security and compliance.

Asset management

Instance lifecycle management

Filter and query instances across multiple dimensions, receive subscription expiration reminders, and get a panoramic view of instance status for fine-grained asset management.

Instance inspection

Full-stack health check

Automatically inspect instance configurations, performance baselines, security policies, and backup status. It generates inspection reports and provides actionable recommendations.

Intelligent Q&A

The Intelligent Q&A feature allows you to use natural language to quickly query instance information and ask product-related technical questions. The AI Assistant helps you understand the distributed architecture of PolarDB-X and has professional knowledge of concepts such as CN/DN nodes.

Use cases

  • Global resource queries: Batch query instance configurations, topology, sharding rules, and performance metrics.

  • Abnormal instance screening: Identify at-risk instances with issues such as abnormal connections on DN or CN nodes, sharding hotspots, or storage skew.

  • Sharding and topology queries: Query database and table sharding rules, data distribution, and global secondary index status.

  • Compliance and governance checks: Check security policies, such as whether SQL Audit is enabled, IP address whitelists are configured, or SSL encryption is active.

  • Product and technical consultation: Get information on PolarDB-X features, version characteristics, and distributed best practices.

Quick start

Ask simple questions to have the PolarDB-X AI Assistant quickly retrieve instance configuration, topology, data distribution, and performance metrics, eliminating the need for manual searches.

  • Supported query dimensions

    • Instance attributes: Instance ID, version, specifications, status, number of CN/DN nodes, storage type, and VPC and network information.

    • Topology: List and status of CN and DN nodes, GMS node information, and read/write splitting configuration.

    • Data distribution: Database and table sharding rules, sharding key information, data distribution, and global secondary index status.

    • Billing and cost: Billing method, expiration date, specifications of each node, and cost breakdown.

    • Monitoring metrics: View CPU utilization, IOPS, QPS/TPS, and the number of connections for all nodes in batches.

  • Example questions

    • Query all PolarDB-X instances in the China (Hangzhou) region under the current account.

    • List the details of the CN and DN nodes for instance pxc-bp1abc****, including the specifications and running status of each node.

    • Show the data distribution for the order_db database in instance pxc-bp1abc****.

    • Find all instances where the storage utilization of any DN node exceeds 80%.

    • List all PolarDB-X instances in a production environment that do not have SQL Audit enabled.

Intelligent Diagnosis

Powered by a large AI model, the AI Assistant's Intelligent Diagnosis feature provides comprehensive automated diagnosis and optimization for distributed databases. Use the AI Assistant for in-depth analysis of instance status, slow SQL queries, and storage space to quickly identify root causes and receive actionable optimization suggestions.

Use cases

  • Slow SQL diagnosis: Analyze the execution plan of a distributed query to automatically identify common performance issues such as full table scans, cross-shard joins, and data skew. It also provides suggestions for index optimization and sharding key adjustments.

  • CPU, memory, and I/O performance troubleshooting: When an instance experiences a CPU spike, abnormal memory usage, or an I/O bottleneck, the AI Assistant can pinpoint resource hotspots by correlating monitoring metrics with runtime logs and provide targeted tuning solutions.

Quick start

  • Instance anomaly analysis: Analyze scenarios such as CPU spikes, storage space growth, DN node anomalies, distributed transaction timeouts, and slow queries.

  • Performance optimization: When CPU, memory, or IOPS metrics fluctuate abnormally, the assistant analyzes resource hotspots and provides targeted tuning solutions.

  • Capacity management: Analyze storage space usage trends to get growth forecasts and recommendations for scaling time windows.

Intelligent Inspection

Inspection coverage

The inspection report covers the following dimensions:

  • Instance status: Status of primary instances, read-only/sub-instances, and associated instances; DN disk utilization; and O&M task execution windows.

  • Backup status: Backup policy configuration (type, cycle, retention period), backup set list validity (last backup time, success rate), and whether cross-region backup is enabled.

  • Security configuration: IP address whitelist access control, separation of duties for accounts, SSL encryption for data in transit, Transparent Data Encryption (TDE) for data at rest, and SQL Audit and Insights.

  • High availability and disaster recovery: Distribution of CNs across availability zones, distribution of DN replicas (Leader, Follower, Logger), and overall cross-availability zone disaster recovery capability assessment.

Quick start

  1. Log on to the PolarDB-X console, select a target instance from the Instances, and on the instance details page, click AI Instance Inspection.

  2. Set the inspection frequency. You can run the inspection after selecting a time range.

  3. In the task list, click View Report to get detailed inspection results and optimization suggestions for each instance. You can also click Download to export the report as a PDF or image file.

Skill invocation integration

The PolarDB-X AI Assistant can be integrated as an Agent Skill into AI coding assistants and IDEs, embedding intelligent O&M capabilities for distributed databases directly into your development workflow. You can trigger Skill calls using natural language in your AI coding assistant, completing O&M tasks without switching to the console.

Skill information

  • Skill URL: https://skills.aliyun.com/skills/alibabacloud-polardbx-ai-assistant

  • Skill name: alibabacloud-polardbx-ai-assistant

  • Capabilities: Call the Skill to perform O&M tasks for PolarDB-X or MySQL-compatible databases directly in your IDE. Supported tasks include cluster management, topology inspection, performance diagnosis, SQL optimization, data distribution analysis, elastic scaling diagnosis, connection and session analysis, security auditing, backup and recovery, and parameter tuning.

Installation

Run the following command in your terminal to install the Skill:

npx skills add aliyun/alibabacloud-aiops-skills --skill alibabacloud-polardbx-ai-assistant --agent <AgentName> -y --full-depth

A variety of AI Agents are supported, including Qoder, Qwen Code, Claude Code, OpenClaw, Codex, Cursor, Gemini, and GitHub Copilot.

Usage examples

Enter questions like the following in your AI coding assistant to trigger the Skill:

  • Query all PolarDB-X instances under the current account.

  • Diagnose slow SQL issues for instance pxc-bp1abc****.

  • Perform a health inspection on instance pxc-bp1abc****.

  • Analyze the data distribution and sharding hotspots for the instance.

Editions and billing

Editions

The PolarDB-X AI Assistant offers tiered services across three editions: Basic, Enhanced, and Advanced.

  • Basic: Includes three core capabilities: Intelligent Q&A, Intelligent Diagnosis, and basic inspection. It is ideal for getting started.

  • Enhanced: Includes all features of the Basic edition, plus batch inspection, scheduled inspection, health scoring/24-hour inspection, account-wide instance inspection, ecosystem integration, report delivery, API integration, and capacity pack add-ons. It allows up to 30 inspections per month and includes standard business support.

  • Advanced: Includes all features of the Enhanced edition, plus SQL Review, DDL change assessment and impact analysis, traffic anomaly analysis, data skew analysis, intelligent traffic throttling, comprehensive SQL analysis, and A2A protocol/IDE integration. It also comes with professional business support.

Billing methods

  • Basic edition: The Basic edition is free forever and allows you to experience the core capabilities.

  • Enhanced and Advanced editions: Designed for enterprise-level, large-scale intelligent O&M. Billing is tiered based on the number of managed PolarDB-X nodes under your account. The larger the scale, the lower the cost per node. The billing rules are as follows:

    • Node tiers: Four tiers are available: 1–50, 51–200, 201–1,000, and 1,000+.

    • Edition selection: Choose between the Enhanced edition (30 inspections/month) and the Advanced edition (unlimited inspections) based on your needs.

    • Subscription duration: You can subscribe by the week (7 days), month, or year, with costs prorated accordingly.

    • Node expansion packs: You can purchase additional node packs if needed, priced at USD 15/node/month.

Pricing tiers

Node scale

Enhanced edition (USD/month)

Advanced edition (USD/month)

1–50 nodes

920

1,380

51–200 nodes

1,850

2,460

201–1,000 nodes

3,380

5,380

1,000+ nodes

6,150

9,230

Activation

New purchase

Log on to the PolarDB-X console. In the left-side navigation pane, click PolarDB-X AI Assistant, and then choose the Basic or Enhanced.

  • Basic: You can start using it immediately.

  • Enhanced: Select a suitable edition and click Activate Now. On the activation page, configure your edition, node scale, expansion packs, and subscription duration, and then click Buy Now.

Upgrade, downgrade, and renewal

Log on to the PolarDB-X console. In the left-side navigation pane, choose PolarDB-X AI Assistant > Enhanced. On the AI Assistant page, you can perform upgrade, downgrade, or renewal operations.

Unsubscribe

  1. Go to the Billing Management > Resource Unsubscription page. Select the resource you want to unsubscribe from and click Unsubscribe Resource to open the unsubscription details page.

  2. In the lower-right corner, click Unsubscribe , select a reason for unsubscribing, and click OK.

Usage notes

  • Ask precise questions: When asking a question, specify the instance ID, region, and time range, and describe the issue. For distributed scenarios, specify the DN node or database name to get a more accurate diagnosis.

  • Use contextual conversation: The AI Assistant supports multi-turn conversations and can follow up on previous diagnostic results. However, for sensitive operations, such as suggestions to change sharding rules, carefully evaluate them before proceeding.

  • Diagnosis timeliness: Performance diagnosis relies on monitoring data. Start the analysis as soon as possible after an issue occurs to ensure that the relevant metric data is still within its retention period. If the session becomes unresponsive, exit and start a new conversation.

  • Make cautious decisions: All optimization suggestions are for reference only. Thoroughly test and evaluate all proposed changes to a distributed architecture before applying them.

Security and compliance

  • Data access scope: To provide accurate diagnostic and Q&A services, the PolarDB-X AI Assistant accesses instance metadata, topology information, performance monitoring metrics, key information from the slow log, and your input questions. The AI Assistant does not execute any DDL or DML statements, directly modify instance configurations, or trigger data migration.

  • Permission control: The AI Assistant strictly adheres to the RAM permission system. It executes read-only operations directly, but you must manually confirm and execute any recommendations that involve changes.

  • Data privacy: Your query history and instance data are handled in strict accordance with the Alibaba Cloud privacy policy and are not used for model training or shared with third parties.

  • Disclaimer: The diagnostic conclusions and optimization suggestions provided by the AI Assistant are for reference only. Before you apply any changes in a production environment, especially distributed operations that involve sharding rule adjustments or global secondary index changes, a professional DBA or technical expert must review and assess them.