Hire an AI GaussDB query and schema reviewer
Get a GaussDB query and schema review: distribution keys, slow plans, indexes and storage choices. Bring your SQL, tables and plan output.
What you give
- Which GaussDB you run: distributed or centralized, and the version
- The slow query and its EXPLAIN ANALYZE output
- Table row counts and sizes, and your current indexes
What you get
- A ranked table of findings: what is wrong, how serious, the evidence and the change
- A review of each distribution key and whether joins must move data
- Index and storage engine advice
- A rewritten query or table design where one helps
An example
A query is slow on GaussDB and you have its EXPLAIN ANALYZE output.
You ask: “Get a GaussDB query and schema review: distribution keys, slow plans, indexes and storage choices. Use the material I attach and ask for anything essential that is missing.”
You get back:
- Product and setup. The GaussDB edition and version it assumed, and anything marked MISSING.
- Findings. Ranked problems, each with severity, evidence from your plan, a change and a check.
- Distribution keys. Each table's key, the joins it serves and whether data must move.
An example, not your task.
Words used here
- SQL: the language used to ask a database for data
Hire this specialist
It is free and needs no account. Download the pack, give it to your AI and tell it the job. Your AI asks for anything it is missing, then does the work and checks it.
Related specialists
Details
Everything it can hand back
Your task sets the actual outputs. The specialist picks the methods that cover them.
- A ranked table of findings: what is wrong, how serious, the evidence and the change
- A review of each distribution key and whether joins must move data
- Index and storage engine advice
- A rewritten query or table design where one helps
- Notes on making each change safely, with a way to undo it
- Checks to run before and after
How it does the job well
- You cannot connect to the database. Never say a query was run or a plan was improved. Give plan expectations as things to check.
- Do not guess table sizes, row counts or plan lines. If they are missing, say MISSING.
- Do not change a live production database. Propose changes for the user's database administrator to review and test on a copy first.
- Do not apply PostgreSQL advice without saying whether GaussDB supports it in the user's edition and version.
- Read the existing code, its conventions and its tests before changing anything. Match the project's patterns.
- Make the smallest change that fully solves the request. Keep unrelated refactors out.
- Reproduce a bug before fixing it, and add a test that fails without the fix.
Mistakes it avoids
- Claiming code works without running it or its tests.
- Inventing APIs, package versions or settings instead of checking the installed ones.
- Changing behaviour outside the request, such as reformatting whole files or renaming public interfaces.
What a good result looks like
An example, not your task: A query is slow on GaussDB and you have its EXPLAIN ANALYZE output.
- Product and setup. The GaussDB edition and version it assumed, and anything marked MISSING.
- Findings. Ranked problems, each with severity, evidence from your plan, a change and a check.
- Distribution keys. Each table's key, the joins it serves and whether data must move.
- Indexes and storage. Index and Ustore or Astore advice with the reason.
- Rewrites. A before and after for each changed query or table.
- Safe change notes. What each change costs on a large table and how to undo it.
How the work is checked
- The changed files build, and the relevant tests and linters pass. The commands and results are shown.
- Each change is explained in one line with its reason, and risky areas are named.
- Any check that could not run is reported as NOT_RUN with what it needs.
- States which checks passed, failed or could not run, and names missing inputs.
These checks have not been run against a model yet. Your AI uses them to check its own work.
Capabilities
- Pin down the product. It confirms GaussDB OLTP, distributed or centralized, and the version. It asks if this is unclear.
- Read the tables. It checks each distribution key, partition, storage type and index against how the tables are joined.
- Read the plan. It finds scans of large tables, Broadcast and Redistribute steps, and gaps between estimated and actual rows.
- Rank the findings. It orders findings by cost, with the evidence line and how sure it is.
- Draft the fixes. It writes a changed query or table design where one helps, and says what to check after.
- Plan a safe change. It notes the cost of changing a large table across nodes, a quiet time to do it and a way to undo it.
How the role works
- Checks your task, context and available tools.
- Picks the methods needed and prepares a work plan.
- Carries out supported tasks, with each method's limits and review gates.
- Checks the real deliverables and corrects supported faults.
- Hands back files, evidence and unresolved gaps.
Your specialist's working setup
Download the base specialist without a task form or account. README.md and SETUP.md explain how to use the folder. SOUL.md defines its scope. INTAKE.md asks missing questions inside your AI. PLAYBOOK.md, SKILLS.md, BEST_PRACTICES.md, CHECKS.md and HANDOFF.md guide the work and its checked deliverables.
Complete associated skills, supporting files and licences are included. Choose only the methods needed for the actual task. Keep context, working files and accepted feedback in your AI project.
Use this specialist through MCP or the API
Call prepare_specialist with role_id engineering-gaussdb-expert only. No task is required to load it. Your AI asks what job you need done, what you want back and which relevant context it can use.
For task-led hiring, call find_specialist, explain the suggested specialists and let the user accept or change the team.
Complete ZIP: Download base specialist. API: GET /api/v1/specialists/engineering-gaussdb-expert/pack. The host AI supplies its own model, tools and execution; a pack does not connect accounts or run a task.
Inputs and helpful context
The specialist starts from the task brief. Only active methods require their inputs.
For the primary method, when used
- Which GaussDB you run: distributed or centralized, and the version
- The CREATE TABLE statements, with distribution, partition and storage settings
- The slow query and its EXPLAIN ANALYZE output
- Table row counts and sizes, and your current indexes
- What the app does with the data, such as many small updates or large reports (optional)
Helpful context (optional)
- The slow query log entry for the query, with its run time.
- The Huawei GaussDB documentation page for your version, to confirm syntax.
Tools and access
- Claude, ChatGPT or Gemini with file upload: Plans and table statements are long, and file upload keeps them whole.
Functions and deliverables
- GaussDB query and schema reviewer: Get a GaussDB query and schema review: distribution keys, slow plans, indexes and storage choices. Bring your SQL, tables and plan output.
- A ranked table of findings: what is wrong, how serious, the evidence and the change
- A review of each distribution key and whether joins must move data
- Index and storage engine advice
- A rewritten query or table design where one helps
- Notes on making each change safely, with a way to undo it
- Checks to run before and after
- Database schema planner: Share SQL table definitions. Get a schema review, query and index advice, and a migration plan.
- Schema issues list
- Table diagram
- Index recommendations
- Step by step migration plan
- SQL query launch reviewer: Share a SQL query before it goes live. Get wrong-result risks, slow spots and rewrites ranked by impact.
- Syntax and lint results
- Wrong-result risks by severity
- Slow steps from the query plan
- Join fan-out warnings
- Rewrites ranked by impact
- SQL query helper: Describe the data question and share the schema. It drafts a query or migration and suggests checks; execution needs a connected database.
- A SQL query in a code block, checked for common mistakes
- A short note on indexes and rewrites, about three lines
- Up and down migration scripts
- The rollback script in its own code block
- A written map of your schema
- The same change for your ORM, if you use one
- AI project context organiser: Share your project and next task. Get a short rules file, a focused file list and a clear handoff for later sessions.
- A ready rules file for your project
- A list of which files to load for each task
- Rules for when to reset or trim the session
- A checklist for spotting drifting answers
Tasks you can use it for
- A query is slow on GaussDB and you have its EXPLAIN ANALYZE output.
- You are designing tables for a new GaussDB system and need to pick distribution keys.
- Your plan shows Broadcast steps on large tables.
- Updates and deletes make tables swell, and you are choosing between Ustore and Astore.
Limits to check before starting
- Your database is PostgreSQL, MySQL or Oracle. Use the Database performance analyst.
- Your product is GaussDB(DWS), openGauss or GaussDB(for MySQL). This agent covers GaussDB OLTP only.
- You need backup, restore or failover plans. Use the Database recovery planner.
Best way to use this role
Give it one clear outcome, the actual files and a definition of done. Keep the work in one AI project so it can reuse checked context and earlier files.
- Download the pack from this page and add it to your AI as a skill. If you cannot, open a new chat and paste SKILL.md, then references/source-agent.md.
- Say which GaussDB product you run. If you are not sure, your AI asks before it answers.
- Paste your table statements, the slow query and the EXPLAIN ANALYZE output. Add row counts if you have them.
- Say "Review this. Ask once if anything is missing. Point each finding to a line in my plan."
- Read the findings table from the top. Each finding must point to evidence in your own plan. Ask again if one does not.
- Try each change on a copy, run EXPLAIN ANALYZE again, then compare. Check unfamiliar syntax in Huawei's GaussDB docs.
Read it as data
Read the complete role setup as JSON. Connect your AI to the AI Blocks MCP library and read aiblocks://roles/engineering-gaussdb-expert for its role instructions and pinned sources.
This is a prepared AI role. No task has run. Your AI carries out authorized work using its available tools and reports the actual deliverables and checks.