Ia PostgreSQL FDW
Ia PostgreSQL FDW
Ia PostgreSQL FDW
POSTGRESQL-FDW
Ibrar Ahmed
2
Who am I?
Software Career
• Software industries since 1998.
PostgreSQL Career
• Working on PostgreSQL Since 2006.
02 SQL-MED
03 FDW Example
04 Push Down
05 Connection Pooling
MySQL libmysqlclient
Module
U Postgre
S SQL Libpq
Module
E
R
MongoDB
libmongo-c
A Module
P Join
P
JDBC
L Module
JDBC
I
C
A JDBC
JDBC
T Module
I
O
ODBC
N ODBC
Module
SQL-MED - Management of External Data
• SQL/MED provides extensions to SQL that define FDW ( Foreign Data Wrapper)
MySQL
Module mysql_fdw libmysqlclient
U
S PostgreS
E QL postgres_fdw Libpq
Module
R P
o
A MongoDB s
P Module t mongo_fdw libmongo-c
P g FDW
L r
I Spark e hdfs_fdw JDBC
Module
C S
A Q
T L
Hive
I Module hdfs_fdw JDBC
O
N
Clickhous
e file_fdw ODBC
Module
2.
FDW-Example
Example
mysql_tbl_continents
Countries / Country
mysql_tbl_countries
QUERY PLAN
Foreign Scan
Output: n.id, n.name, j.id, j.job_title, j.name_id
Relations: (public.postgres_tbl_job j)
LEFT JOIN (public.postgres_tbl_name n)
3. Connect to MySQL
1. PostgreSQL Query 2. MySQL Query 4. MySQL Query
Client MySQL_FDW
• There are several Foreign Data Wrappers that support DML such as:
○ postgres_fdw
○ mysql_fdw
○ oracle_fdw
Questions?
“Poor leaders rarely ask questions of themselves or others. Good leaders, on the other hand, ask many questions. Great leaders ask the great questions.”
Michael Marquardt author of
Leading with Questions