> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pawsql.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> PawSQL 是一个产品：Cloud 是公网部署形态，Engine / Optimizer / Auditor / Advisor / Patroller 是同一产品的组件与交付形态，不是彼此独立的产品。 / PawSQL is a single product: Cloud is the public deployment form, while Engine / Optimizer / Auditor / Advisor / Patroller are components and delivery forms of the same product, not separate products.
> 术语以站内术语表为准：SQL 审核对应英文 SQL Review，查询重写对应 Query Rewrite，索引推荐对应 Index Recommendation；英文内容统一用 Review，不用 Audit。 / Use the site glossary for terminology: 审核 is SQL Review, 重写 is Query Rewrite, 索引推荐 is Index Recommendation; English content uses Review, never Audit.
> 引用能力范围或版本支持时以对应页面为准；标注 unknown、或 status 非 published 的内容表示尚未经产品核实，不应作为事实引用。 / Cite capability scope and version support from the corresponding page; content marked unknown, or with a status other than published, is not yet product-verified and must not be cited as fact.

# Supported Databases

> Databases PawSQL supports (relational, Chinese enterprise, distributed, and big-data), with a per-database capability matrix.

PawSQL supports a wide range of mainstream relational databases, Chinese enterprise databases, distributed databases, and big-data SQL engines.

Support varies by database and capability. In addition to SQL parsing, PawSQL may provide SQL quality check, query rewrite, index recommendation, execution plan analysis, performance validation, and production SQL governance depending on the target database.

## Definition

Database support in PawSQL means both the ability to parse a database's SQL dialect and the depth of database-aware analysis available, which varies by database, version, and deployment mode.

***

## Relational Databases

### Mainstream Databases

* MySQL
* PostgreSQL
* MariaDB
* Oracle
* Microsoft SQL Server
* IBM Db2

### Chinese Enterprise Databases

* openGauss
* GaussDB
* KingbaseES
* Dameng
* MogDB

PawSQL provides database-specific adaptations instead of treating these systems only as MySQL- or PostgreSQL-compatible dialects.

Depending on the database, adaptations may cover:

* SQL syntax and data types
* Built-in functions
* DDL syntax
* Metadata interfaces
* Indexing mechanisms
* Query optimizer behavior
* Execution plan formats

***

## Distributed Databases

PawSQL provides dedicated support for distributed database systems where SQL performance depends not only on access paths and indexes, but also on data distribution and cross-node execution.

Supported distributed databases include:

* OceanBase
  * MySQL Mode
  * Oracle Mode
* TDSQL MySQL
* TDSQL PostgreSQL
* TDSQL PostgreSQL Distributed
* TDSQLx-MySQL
* GoldenDB
* PolarDB-X

For distributed databases, PawSQL can analyze database-specific characteristics such as:

* Distribution keys
* Sharding keys
* Sharded tables
* Replicated or broadcast tables
* Cross-shard joins
* Data redistribution
* Local and global indexes
* Distributed execution plans

These capabilities can be used in SQL quality check, migration governance, and distributed SQL performance optimization.

***

## Big Data

### Apache Hive

PawSQL supports Apache Hive SQL and provides optimization rules designed specifically for distributed analytical workloads.

Supported analysis scenarios include:

* Partition pruning
* Bucketed join analysis
* MapJoin-related optimization
* `COUNT DISTINCT` skew analysis
* `GROUP BY` skew analysis
* Window-function skew analysis
* Global sorting and Top-N optimization
* `UNION` skew analysis
* Distributed SQL best-practice checks

Hive support focuses on SQL quality, execution efficiency, and data-skew risks that are specific to large-scale distributed processing.

***

## Compatibility Matrix

The following matrix summarizes the major PawSQL capabilities available across supported databases.

| Database             | SQL Review | Query Rewrite | Index Advisor | Performance Validation | Plan Analysis | Production Governance |
| -------------------- | :--------: | :-----------: | :-----------: | :--------------------: | :-----------: | :-------------------: |
| MySQL                |      ✓     |       ✓       |       ✓       |            ✓           |       ✓       |           ✓           |
| PostgreSQL           |      ✓     |       ✓       |       ✓       |            ✓           |       ✓       |           ✓           |
| MariaDB              |      ✓     |       ✓       |       ✓       |            ◐           |       ◐       |           ◐           |
| Oracle               |      ✓     |       ✓       |       ✓       |            ✓           |       ✓       |           ✓           |
| Microsoft SQL Server |      ✓     |       ✓       |       ✓       |            ✓           |       ✓       |           ◐           |
| IBM Db2              |      ✓     |       ✓       |       ✓       |            ✓           |       ✓       |           ◐           |
| openGauss            |      ✓     |       ✓       |       ✓       |            ✓           |       ✓       |           ✓           |
| GaussDB              |      ✓     |       ✓       |       ✓       |            ✓           |       ✓       |           ◐           |
| KingbaseES           |      ✓     |       ✓       |       ✓       |            ✓           |       ✓       |           ◐           |
| Dameng               |      ✓     |       ✓       |       ✓       |            ◐           |       ◐       |           ◐           |
| MogDB                |      ✓     |       ✓       |       ✓       |            ✓           |       ✓       |           ◐           |
| OceanBase            |      ✓     |       ✓       |       ✓       |            ✓           |       ✓       |           ◐           |
| TDSQL                |      ✓     |       ✓       |       ✓       |            ✓           |       ✓       |           ◐           |
| GoldenDB             |      ✓     |       ✓       |       ✓       |            ◐           |       ◐       |           ◐           |
| PolarDB-X            |      ✓     |       ✓       |       ✓       |            ◐           |       ◐       |           ◐           |
| Apache Hive          |      ✓     |       ✓       |       —       |            —           |       ◐       |           ◐           |

**Legend**

* **✓** Fully supported
* **◐** Supported with database- or version-specific limitations
* **—** Not applicable or currently unavailable

> The matrix represents PawSQL's overall product capabilities. Exact support may vary by PawSQL release, database version, deployment mode, and whether online metadata access is available.

***

## Database Support Is More Than SQL Parsing

For PawSQL, supporting a database does not simply mean that its SQL syntax can be parsed.

Database integration may include multiple layers:

```text theme={null}
SQL Dialect
    ↓
Semantic Analysis
    ↓
Schema & Metadata
    ↓
Rewrite Rules
    ↓
Index Model
    ↓
Database Optimizer
    ↓
Execution Plan
    ↓
Performance Validation
```

The deeper the integration, the more database-aware optimization PawSQL can provide.

***

## Online and Offline Modes

PawSQL can work in both online and offline environments.

### Online Mode

When PawSQL can connect to the target database, it may retrieve:

* Tables
* Columns
* Indexes
* Views
* Statistics
* Distribution metadata
* Execution plans

Online mode provides the richest context for SQL optimization and performance validation.

### Offline Mode

When direct database access is restricted, PawSQL can analyze SQL based on schema definitions such as:

* DDL files
* Manually imported DDL
* Schema exported from development or test environments

Offline mode is commonly used for:

* CI/CD
* SQL Quality Gates
* Pre-production review
* Security-isolated environments
* Database migration
* Financial industry environments

***

## Version Compatibility

Database capabilities may differ between major and minor versions.

Examples include:

* SQL syntax changes
* New data types
* Optimizer behavior
* Execution plan formats
* Metadata interfaces
* Distributed database features

For production deployment, always verify compatibility against the PawSQL release you are using.

***

## Compatible Database Variants

Some databases are derived from or compatible with MySQL, PostgreSQL, or openGauss.

PawSQL does not automatically assume that compatible databases are identical.

Database-specific differences may exist in:

* Functions
* DDL
* Hints
* Indexes
* System catalogs
* Distribution syntax
* Optimizer behavior
* Execution plans

Where required, PawSQL maintains dedicated adaptations for individual database products.

***

## Feature Availability

Feature availability may depend on:

* Database type
* Database version
* PawSQL edition
* PawSQL release
* Online or offline mode
* Availability of metadata and execution plans

If a feature is marked as partially supported, contact the PawSQL team for the exact compatibility scope of your environment.

***

## Need Support for Another Database?

If your database is not listed above, PawSQL may still be able to support it through an existing compatibility layer or a dedicated database adaptation.

Typical cases include:

* MySQL-compatible databases
* PostgreSQL-compatible databases
* openGauss-compatible databases
* Industry-specific databases
* Enterprise-customized database distributions

Contact the PawSQL team to evaluate compatibility and adaptation requirements.

***

## Next steps

After confirming your database and version are supported, follow [Choose How to Use PawSQL](/en/getting-started/choose-access) or the [quickstart](/en/getting-started/quickstart) to start optimizing SQL.
