mysql_fdw
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
mysql_fdw | 2.9.3 | FDW | BSD-3-Clause | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 8600 | mysql_fdw | No | Yes | No | Yes | No | Yes | - |
| Related | postgres_fdw oracle_fdw tds_fdw db2_fdw sqlite_fdw informix_fdw firebird_fdw odbc_fdw jdbc_fdw db_migrator |
|---|
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PGDG | 2.9.3 | 1817161514 | mysql_fdw | - |
| RPM | PGDG | 2.9.3 | 1817161514 | mysql_fdw_$v | - |
| DEB | PGDG | 2.9.3 | 1817161514 | postgresql-$v-mysql-fdw | - |
Install
You can install mysql_fdw directly. First, make sure the PGDG repository is added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
Usage
Create Server
Server Options: host (default 127.0.0.1), port (default 3306), secure_auth (default true), init_command, use_remote_estimate (default false), reconnect (default false), sql_mode (default ANSI_QUOTES), fetch_size (default 100), character_set, truncatable (default true), plus SSL options (ssl_key, ssl_cert, ssl_ca, ssl_capath, ssl_cipher).
Create User Mapping
Create Foreign Table
Table Options: dbname (required, MySQL database name), table_name (defaults to foreign table name), fetch_size (overrides server setting), max_blob_size, truncatable (default true).
CRUD Operations
Pushdown Features
mysql_fdw optimizes queries through several pushdown mechanisms:
- WHERE clause pushdown to minimize data transfer
- Column pushdown to retrieve only requested columns
- JOIN pushdown for joins between foreign tables on the same MySQL server
- AGGREGATE pushdown for
min,max,sum,avg,count - ORDER BY and LIMIT/OFFSET pushdown to reduce network traffic
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)