mysql_fdw
mysql_fdw : Foreign data wrapper for querying a MySQL server
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 8600 | mysql_fdw | mysql_fdw | 2.9.3 |
FDW | BSD-3-Clause | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-r | No | Yes | No | Yes | yes | no |
| Relationships | |
|---|---|
| See Also | postgres_fdw oracle_fdw tds_fdw db2_fdw sqlite_fdw informix_fdw firebird_fdw odbc_fdw jdbc_fdw db_migrator |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PGDG | 2.9.3 |
18 17 16 15 14 | mysql_fdw |
- |
| RPM | PGDG | 2.9.3 |
18 17 16 15 14 | mysql_fdw_$v |
- |
| DEB | PGDG | 2.9.3 |
18 17 16 15 14 | postgresql-$v-mysql-fdw |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 |
| el8.aarch64 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 |
| el9.x86_64 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 |
| el9.aarch64 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 |
| el10.x86_64 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 |
| el10.aarch64 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 |
| d12.x86_64 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 |
| d12.aarch64 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 |
| d13.x86_64 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 |
| d13.aarch64 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 |
| u22.x86_64 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 |
| u22.aarch64 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 |
| u24.x86_64 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 |
| u24.aarch64 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 |
| u26.x86_64 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 |
| u26.aarch64 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 | PGDG 2.9.3 |
Source
github.com/EnterpriseDB/mysql_fdw
mysql_fdw-REL-2_9_3.tar.gz
Install
Make sure PGDG repo available:
Install this extension with pig:
Create this extension with:
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