SlideShare a Scribd company logo
1 of 73
Download to read offline
Federating Queries Using postgres fdw
john melesky
Rentrak, Inc
September 17, 2013
Who Am I?
A long-time programmer, working with PostgreSQL in the
cloud
Who Am I?
A long-time programmer, working with PostgreSQL in the
cloud my butt
Who Am I?
A long-time programmer, working with PostgreSQL in the
cloud my butt
Now, a DBA, working with PostgreSQL on real machines with
real disks
Who Am I?
A long-time programmer, working with PostgreSQL in the
cloud my butt
Now, a DBA, working with PostgreSQL on real machines
VMWare with real disks
Who Am I?
A long-time programmer, working with PostgreSQL in the
cloud my butt
Now, a DBA, working with PostgreSQL on real machines
VMWare with real disks NetApps
PostgreSQL inheritance partitioning
create table transactions (
id serial,
user_id bigint,
time_utc timestamp,
int_value bigint,
txt_value text,
primary key (id)
);
create table transactions_201306 (
like transactions including indexes,
check
(time_utc >= ’2013-06-01’ and
time_utc < ’2013-07-01’)
) inherits (transactions);
PostgreSQL inheritance partitioning
create table transactions (
id serial,
user_id bigint,
time_utc timestamp,
int_value bigint,
txt_value text,
primary key (id)
);
create table transactions_201306 (
like transactions including indexes,
check
(time_utc >= ’2013-06-01’ and
time_utc < ’2013-07-01’)
) inherits (transactions);
You know this already
Old-school partitioning
create view transactions as (
select * from transactions_201301
union all
select * from transactions_201302
union all
select * from transactions_201303
union all
select * from transactions_201304
union all
...
);
Why don’t we still use this?
Why don’t we still use this?
1. No insert triggers on views
Why don’t we still use this?
1. No insert triggers on views
2. No ”inherit indexes” without additional misdirection
Why don’t we still use this?
1. No insert triggers on views
2. No ”inherit indexes” without additional misdirection
3. Basically, we have a better option with inheritence partitioning
Postgres Foreign Data Wrapper
-- just once
create extension postgres_fdw;
-- once per data node
create server node0 foreign data wrapper postgres_fdw
options (connection stuff);
create user mapping for app_user server node0;
-- once per table per node
create foreign table transactions_node0
(table definition)
server node0
options (table_name ’transactions’);
Federating, Old-school
create view transactions as (
select * from transactions_node0
union all
select * from transactions_node1
union all
select * from transactions_node2
union all
select * from transactions_node3
union all
...
);
Querying
primary=# explain select count(*) from transactions;
QUERY PLAN
---------------------------------------------------------
Aggregate (cost=1767.38..1767.39 rows=1 width=0)
-> Append (cost=100.00..1699.12 rows=27304 width=0)
-> Foreign Scan on transactions_node0
(cost=100.00..212.39 rows=3413 width=0)
-> Foreign Scan on transactions_node1
(cost=100.00..212.39 rows=3413 width=0)
-> Foreign Scan on transactions_node2
(cost=100.00..212.39 rows=3413 width=0)
-> Foreign Scan on transactions_node3
(cost=100.00..212.39 rows=3413 width=0)
-> Foreign Scan on transactions_node4
(cost=100.00..212.39 rows=3413 width=0)
...
(10 rows)
Time: 1.226 ms
Querying
primary=# explain verbose select count(*) from transactions;
QUERY PLAN
-----------------------------------------------------------------
Aggregate (cost=1767.38..1767.39 rows=1 width=0)
Output: count(*)
-> Append (cost=100.00..1699.12 rows=27304 width=0)
-> Foreign Scan on public.transactions_node0
(cost=100.00..212.39 rows=3413 width=0)
Remote SQL: SELECT NULL FROM public.transactions
-> Foreign Scan on public.transactions_node1
(cost=100.00..212.39 rows=3413 width=0)
Remote SQL: SELECT NULL FROM public.transactions
-> Foreign Scan on public.transactions_node2
(cost=100.00..212.39 rows=3413 width=0)
Remote SQL: SELECT NULL FROM public.transactions
...
(19 rows)
Time: 1.273 ms
Querying
primary=# select count(*) from transactions;
count
---------
1095336
(1 row)
Time: 3035.054 ms
Round-robin
primary
node 0
(id % 4 = 0)
node 1
(id % 4 = 1)
node 2
(id % 4 = 2)
node 3
(id % 4 = 3)
Round-robin
primary=# create foreign table transactions_node0 (
primary(# id serial,
primary(# user_id bigint,
primary(# time_utc timestamp,
primary(# int_value bigint,
primary(# txt_value text,
primary(# check ((id % 8) = 0)
primary(# ) server node0
primary(# options (table_name ’transactions’);
ERROR: constraints are not supported on foreign tables
LINE 6: check ((id % 8) = 0)) server node0 ...
Domain-based (aka ”sharding”)
primary
node 0
(customer = 'bigone')
node 1
(customer in ('bigtwo', 'bigthree')
node 2
(customer in (...))
node 3
(customer in (...))
Range-based
primary
node 0
(date between '2013-01-01' and '2013-01-31')
node 1
(date between ...)
node 2
(date between ...)
node 3
date between ...)
Table-based
primary
node 0
(users table(s))
node 1
(transactions table)
node 2
(session tables)
Multi-head
primary1
node0 node1node2 node3
primary2
Multi-head
primary1
node0 node1node2 node3
primary2primary3 primary4
Demo time
Limitations: Network traffic
Limitations: Network traffic
primary=# select count(*) from transactions_local;
count
---------
1095336
(1 row)
Time: 209.097 ms
Limitations: Network traffic
primary=# select count(*) from transactions_local;
count
---------
1095336
(1 row)
Time: 209.097 ms
primary=# select count(*) from transactions_primary;
count
---------
1095336
(1 row)
Time: 2867.385 ms
Limitations: Dumb queries
Limitations: Dumb queries
primary=# explain verbose select count(*) from transactions;
QUERY PLAN
-----------------------------------------------------------------
Aggregate (cost=1767.38..1767.39 rows=1 width=0)
Output: count(*)
-> Append (cost=100.00..1699.12 rows=27304 width=0)
-> Foreign Scan on public.transactions_node0
(cost=100.00..212.39 rows=3413 width=0)
Remote SQL: SELECT NULL FROM public.transactions
...
Limitations: Dumb queries
primary=# explain verbose select count(*) from transactions;
QUERY PLAN
-----------------------------------------------------------------
Aggregate (cost=1767.38..1767.39 rows=1 width=0)
Output: count(*)
-> Append (cost=100.00..1699.12 rows=27304 width=0)
-> Foreign Scan on public.transactions_node0
(cost=100.00..212.39 rows=3413 width=0)
Remote SQL: SELECT NULL FROM public.transactions
...
primary=# explain verbose select avg(int_value) from transactions;
QUERY PLAN
--------------------------------------------------------------------------
Aggregate (cost=1545.60..1545.61 rows=1 width=8)
Output: avg(transactions_node0.int_value)
-> Append (cost=100.00..1494.40 rows=20480 width=8)
-> Foreign Scan on public.transactions_node0
(cost=100.00..186.80 rows=2560 width=8)
Output: transactions_node0.int_value
Remote SQL: SELECT int_value FROM public.transactions
...
Limitations: Dumb queries
select type, count(*)
from users
group by type
order by 2 desc;
Limitations: Joins
Limitations: Joins
select count(*)
from transactions t, users u
where t.user_id = u.id
and u.type = ’mistaken’;
Limitations: Keys
Limitations: Keys
’Nuff said
Limitations: Constraint exclusion
Remember this?
ERROR: constraints are not supported on foreign tables
LINE 6: check ((id % 8) = 0)) server node0 ....
Limitations: Single-threaded executer
Limitations: Single-threaded executer
How many nodes do you have?
Limitations: Single-threaded executer
How many nodes do you have?
Do you know what they’re doing?
Strategies
Large working set, small nodes
Node-level partitioning
Heavy distributed processing
Multi-head
Strategy: Large working set, small nodes
Strategy: Large working set, small nodes
Your working set is larger than one node’s RAM
Strategy: Large working set, small nodes
Your working set is larger than one node’s RAM
... but you have lots of nodes
Strategy: Large working set, small nodes
Your working set is larger than one node’s RAM
... but you have lots of nodes
(and network is faster than disk)
Strategy: Large working set, small nodes
Your working set is larger than one node’s RAM
... but you have lots of nodes
(and network is faster than disk)
This might be worth looking into if you’re on AWS, but
please, please test it first
Strategy: Node-level partitioning
Like parititioning, but with a separate node per partition group!
Strategy: Node-level partitioning
Like parititioning, but with a separate node per partition group!
As a total strategy, this is probably not worthwhile. However, it
can work with a fast ”current data” node combining with slower
”archived data” nodes.
Heavy distributed processing
Heavy distributed processing
Take advantage of lots of CPUs
Heavy distributed processing
Take advantage of lots of CPUs
Works well when you have node-discrete workloads
Heavy distributed processing
Take advantage of lots of CPUs
Works well when you have node-discrete workloads
Lock management can become a bit hairier
Heavy distributed processing
Take advantage of lots of CPUs
Works well when you have node-discrete workloads
Lock management can become a bit hairier
This might actually be a useful use case
Multi-headed
Multi-headed
Like replication, but with no overhead or delay!
Multi-headed
Like replication, but with no overhead or delay!
Also, no storage overhead!
Multi-headed
Like replication, but with no overhead or delay!
Also, no storage overhead!
Might work well with the distributed processing setup
Multi-headed
Like replication, but with no overhead or delay!
Also, no storage overhead!
Might work well with the distributed processing setup
In fact, given the overhead that lands on the head node, it
might be necessary for a working FDW federation setup
Pan-Strategy Advice
Pan-Strategy Advice
Think very carefully about what tables should live where
Pan-Strategy Advice
Think very carefully about what tables should live where
Think very carefully about tuning settings (especially on your
head node)
work mem
shared buffers
temp buffers
Pan-Strategy Advice
Think very carefully about what tables should live where
Think very carefully about tuning settings (especially on your
head node)
work mem
shared buffers
temp buffers
Think very carefully about how many data nodes you want
Pan-Strategy Advice
Think very carefully about what tables should live where
Think very carefully about tuning settings (especially on your
head node)
work mem
shared buffers
temp buffers
Think very carefully about how many data nodes you want
Think very carefully about network vs. disk vs. dumb-query
costs
Pan-Strategy Advice
Think very carefully about what tables should live where
Think very carefully about tuning settings (especially on your
head node)
work mem
shared buffers
temp buffers
Think very carefully about how many data nodes you want
Think very carefully about network vs. disk vs. dumb-query
costs
Think very carefully!
Thanks!
Questions?
Any questions?
Questions?
Any questions?
John, do you use this approach for your databases?
Questions?
Any questions?
John, do you use this approach for your databases?
Why not?
Thanks!
Thanks!
Plug: Stephen Frost has another postgres fdw talk tomorrow
Thanks!
Plug: Stephen Frost has another postgres fdw talk tomorrow
Also: Rentrak is hiring: programmers, sysadmins, and devops
Federating Queries Using postgres fdw
Introduction
Who am I?
Partitioning
PostgreSQL inheritance partitioning
Old-school partitioning
Federating Queries
Federation Strategies Overview
Trial and Error
Demo
Limitations
Strategies
Wrap-up

More Related Content

What's hot

Новые возможности полнотекстового поиска в PostgreSQL / Олег Бартунов (Postgr...
Новые возможности полнотекстового поиска в PostgreSQL / Олег Бартунов (Postgr...Новые возможности полнотекстового поиска в PostgreSQL / Олег Бартунов (Postgr...
Новые возможности полнотекстового поиска в PostgreSQL / Олег Бартунов (Postgr...Ontico
 
ClickHouse Features for Advanced Users, by Aleksei Milovidov
ClickHouse Features for Advanced Users, by Aleksei MilovidovClickHouse Features for Advanced Users, by Aleksei Milovidov
ClickHouse Features for Advanced Users, by Aleksei MilovidovAltinity Ltd
 
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)Altinity Ltd
 
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEOClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEOAltinity Ltd
 
PostgreSQL 9.4 JSON Types and Operators
PostgreSQL 9.4 JSON Types and OperatorsPostgreSQL 9.4 JSON Types and Operators
PostgreSQL 9.4 JSON Types and OperatorsNicholas Kiraly
 
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...Altinity Ltd
 
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...Altinity Ltd
 
PostgreSQL 9.6 새 기능 소개
PostgreSQL 9.6 새 기능 소개PostgreSQL 9.6 새 기능 소개
PostgreSQL 9.6 새 기능 소개PgDay.Seoul
 
Using PostgreSQL statistics to optimize performance
Using PostgreSQL statistics to optimize performance Using PostgreSQL statistics to optimize performance
Using PostgreSQL statistics to optimize performance Alexey Ermakov
 
PostgreSQL query planner's internals
PostgreSQL query planner's internalsPostgreSQL query planner's internals
PostgreSQL query planner's internalsAlexey Ermakov
 
Monitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
Monitoring Your ISP Using InfluxDB Cloud and Raspberry PiMonitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
Monitoring Your ISP Using InfluxDB Cloud and Raspberry PiInfluxData
 
MariaDB and Clickhouse Percona Live 2019 talk
MariaDB and Clickhouse Percona Live 2019 talkMariaDB and Clickhouse Percona Live 2019 talk
MariaDB and Clickhouse Percona Live 2019 talkAlexander Rubin
 
Big Data in Real-Time: How ClickHouse powers Admiral's visitor relationships ...
Big Data in Real-Time: How ClickHouse powers Admiral's visitor relationships ...Big Data in Real-Time: How ClickHouse powers Admiral's visitor relationships ...
Big Data in Real-Time: How ClickHouse powers Admiral's visitor relationships ...Altinity Ltd
 
Tiered storage intro. By Robert Hodges, Altinity CEO
Tiered storage intro. By Robert Hodges, Altinity CEOTiered storage intro. By Robert Hodges, Altinity CEO
Tiered storage intro. By Robert Hodges, Altinity CEOAltinity Ltd
 
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오PgDay.Seoul
 
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEO
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEOTricks every ClickHouse designer should know, by Robert Hodges, Altinity CEO
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEOAltinity Ltd
 
Webinar: Secrets of ClickHouse Query Performance, by Robert Hodges
Webinar: Secrets of ClickHouse Query Performance, by Robert HodgesWebinar: Secrets of ClickHouse Query Performance, by Robert Hodges
Webinar: Secrets of ClickHouse Query Performance, by Robert HodgesAltinity Ltd
 

What's hot (20)

Новые возможности полнотекстового поиска в PostgreSQL / Олег Бартунов (Postgr...
Новые возможности полнотекстового поиска в PostgreSQL / Олег Бартунов (Postgr...Новые возможности полнотекстового поиска в PostgreSQL / Олег Бартунов (Postgr...
Новые возможности полнотекстового поиска в PostgreSQL / Олег Бартунов (Postgr...
 
ClickHouse Features for Advanced Users, by Aleksei Milovidov
ClickHouse Features for Advanced Users, by Aleksei MilovidovClickHouse Features for Advanced Users, by Aleksei Milovidov
ClickHouse Features for Advanced Users, by Aleksei Milovidov
 
ROracle
ROracle ROracle
ROracle
 
Full Text Search in PostgreSQL
Full Text Search in PostgreSQLFull Text Search in PostgreSQL
Full Text Search in PostgreSQL
 
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
 
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEOClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
 
PostgreSQL 9.4 JSON Types and Operators
PostgreSQL 9.4 JSON Types and OperatorsPostgreSQL 9.4 JSON Types and Operators
PostgreSQL 9.4 JSON Types and Operators
 
PostgreSQL: Advanced indexing
PostgreSQL: Advanced indexingPostgreSQL: Advanced indexing
PostgreSQL: Advanced indexing
 
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
A Practical Introduction to Handling Log Data in ClickHouse, by Robert Hodges...
 
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...
 
PostgreSQL 9.6 새 기능 소개
PostgreSQL 9.6 새 기능 소개PostgreSQL 9.6 새 기능 소개
PostgreSQL 9.6 새 기능 소개
 
Using PostgreSQL statistics to optimize performance
Using PostgreSQL statistics to optimize performance Using PostgreSQL statistics to optimize performance
Using PostgreSQL statistics to optimize performance
 
PostgreSQL query planner's internals
PostgreSQL query planner's internalsPostgreSQL query planner's internals
PostgreSQL query planner's internals
 
Monitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
Monitoring Your ISP Using InfluxDB Cloud and Raspberry PiMonitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
Monitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
 
MariaDB and Clickhouse Percona Live 2019 talk
MariaDB and Clickhouse Percona Live 2019 talkMariaDB and Clickhouse Percona Live 2019 talk
MariaDB and Clickhouse Percona Live 2019 talk
 
Big Data in Real-Time: How ClickHouse powers Admiral's visitor relationships ...
Big Data in Real-Time: How ClickHouse powers Admiral's visitor relationships ...Big Data in Real-Time: How ClickHouse powers Admiral's visitor relationships ...
Big Data in Real-Time: How ClickHouse powers Admiral's visitor relationships ...
 
Tiered storage intro. By Robert Hodges, Altinity CEO
Tiered storage intro. By Robert Hodges, Altinity CEOTiered storage intro. By Robert Hodges, Altinity CEO
Tiered storage intro. By Robert Hodges, Altinity CEO
 
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
 
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEO
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEOTricks every ClickHouse designer should know, by Robert Hodges, Altinity CEO
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEO
 
Webinar: Secrets of ClickHouse Query Performance, by Robert Hodges
Webinar: Secrets of ClickHouse Query Performance, by Robert HodgesWebinar: Secrets of ClickHouse Query Performance, by Robert Hodges
Webinar: Secrets of ClickHouse Query Performance, by Robert Hodges
 

Similar to John Melesky - Federating Queries Using Postgres FDW @ Postgres Open

Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeWim Godden
 
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...Altinity Ltd
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeWim Godden
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeWim Godden
 
Postgres Vienna DB Meetup 2014
Postgres Vienna DB Meetup 2014Postgres Vienna DB Meetup 2014
Postgres Vienna DB Meetup 2014Michael Renner
 
MySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellMySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellEmily Ikuta
 
クラウドDWHとしても進化を続けるPivotal Greenplumご紹介
クラウドDWHとしても進化を続けるPivotal Greenplumご紹介クラウドDWHとしても進化を続けるPivotal Greenplumご紹介
クラウドDWHとしても進化を続けるPivotal Greenplumご紹介Masayuki Matsushita
 
JDD 2016 - Tomasz Borek - DB for next project? Why, Postgres, of course
JDD 2016 - Tomasz Borek - DB for next project? Why, Postgres, of course JDD 2016 - Tomasz Borek - DB for next project? Why, Postgres, of course
JDD 2016 - Tomasz Borek - DB for next project? Why, Postgres, of course PROIDEA
 
MongoDB Auto-Sharding at Mongo Seattle
MongoDB Auto-Sharding at Mongo SeattleMongoDB Auto-Sharding at Mongo Seattle
MongoDB Auto-Sharding at Mongo SeattleMongoDB
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1MariaDB plc
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1MariaDB plc
 
query-optimization-techniques_talk.pdf
query-optimization-techniques_talk.pdfquery-optimization-techniques_talk.pdf
query-optimization-techniques_talk.pdfgaros1
 
Using R on Netezza
Using R on NetezzaUsing R on Netezza
Using R on NetezzaAjay Ohri
 
Exploring Parallel Merging In GPU Based Systems Using CUDA C.
Exploring Parallel Merging In GPU Based Systems Using CUDA C.Exploring Parallel Merging In GPU Based Systems Using CUDA C.
Exploring Parallel Merging In GPU Based Systems Using CUDA C.Rakib Hossain
 
10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQLSatoshi Nagayasu
 
High Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseHigh Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseAltinity Ltd
 
Meetup cassandra for_java_cql
Meetup cassandra for_java_cqlMeetup cassandra for_java_cql
Meetup cassandra for_java_cqlzznate
 
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...InfluxData
 

Similar to John Melesky - Federating Queries Using Postgres FDW @ Postgres Open (20)

Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
Postgres Vienna DB Meetup 2014
Postgres Vienna DB Meetup 2014Postgres Vienna DB Meetup 2014
Postgres Vienna DB Meetup 2014
 
MySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellMySQL 5.7 in a Nutshell
MySQL 5.7 in a Nutshell
 
クラウドDWHとしても進化を続けるPivotal Greenplumご紹介
クラウドDWHとしても進化を続けるPivotal Greenplumご紹介クラウドDWHとしても進化を続けるPivotal Greenplumご紹介
クラウドDWHとしても進化を続けるPivotal Greenplumご紹介
 
JDD 2016 - Tomasz Borek - DB for next project? Why, Postgres, of course
JDD 2016 - Tomasz Borek - DB for next project? Why, Postgres, of course JDD 2016 - Tomasz Borek - DB for next project? Why, Postgres, of course
JDD 2016 - Tomasz Borek - DB for next project? Why, Postgres, of course
 
MongoDB Auto-Sharding at Mongo Seattle
MongoDB Auto-Sharding at Mongo SeattleMongoDB Auto-Sharding at Mongo Seattle
MongoDB Auto-Sharding at Mongo Seattle
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
 
query-optimization-techniques_talk.pdf
query-optimization-techniques_talk.pdfquery-optimization-techniques_talk.pdf
query-optimization-techniques_talk.pdf
 
Apache Cassandra at Macys
Apache Cassandra at MacysApache Cassandra at Macys
Apache Cassandra at Macys
 
Using R on Netezza
Using R on NetezzaUsing R on Netezza
Using R on Netezza
 
Exploring Parallel Merging In GPU Based Systems Using CUDA C.
Exploring Parallel Merging In GPU Based Systems Using CUDA C.Exploring Parallel Merging In GPU Based Systems Using CUDA C.
Exploring Parallel Merging In GPU Based Systems Using CUDA C.
 
10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL
 
High Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseHigh Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouse
 
Meetup cassandra for_java_cql
Meetup cassandra for_java_cqlMeetup cassandra for_java_cql
Meetup cassandra for_java_cql
 
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
 
Gur1009
Gur1009Gur1009
Gur1009
 

More from PostgresOpen

Bruce Momjian - Inside PostgreSQL Shared Memory @ Postgres Open
Bruce Momjian - Inside PostgreSQL Shared Memory @ Postgres OpenBruce Momjian - Inside PostgreSQL Shared Memory @ Postgres Open
Bruce Momjian - Inside PostgreSQL Shared Memory @ Postgres OpenPostgresOpen
 
Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...
Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...
Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...PostgresOpen
 
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres Open
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres OpenKeith Fiske - When PostgreSQL Can't, You Can @ Postgres Open
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres OpenPostgresOpen
 
David Keeney - SQL Database Server Requests from the Browser @ Postgres Open
David Keeney - SQL Database Server Requests from the Browser @ Postgres OpenDavid Keeney - SQL Database Server Requests from the Browser @ Postgres Open
David Keeney - SQL Database Server Requests from the Browser @ Postgres OpenPostgresOpen
 
Keith Paskett - Postgres on ZFS @ Postgres Open
Keith Paskett - Postgres on ZFS @ Postgres OpenKeith Paskett - Postgres on ZFS @ Postgres Open
Keith Paskett - Postgres on ZFS @ Postgres OpenPostgresOpen
 
Kevin Kempter - PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter - PostgreSQL Backup and Recovery Methods @ Postgres OpenKevin Kempter - PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter - PostgreSQL Backup and Recovery Methods @ Postgres OpenPostgresOpen
 
Craig Kerstiens - Scalable Uniques in Postgres @ Postgres Open
Craig Kerstiens - Scalable Uniques in Postgres @ Postgres OpenCraig Kerstiens - Scalable Uniques in Postgres @ Postgres Open
Craig Kerstiens - Scalable Uniques in Postgres @ Postgres OpenPostgresOpen
 
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...PostgresOpen
 
Steve Singer - Managing PostgreSQL with Puppet @ Postgres Open
Steve Singer - Managing PostgreSQL with Puppet @ Postgres OpenSteve Singer - Managing PostgreSQL with Puppet @ Postgres Open
Steve Singer - Managing PostgreSQL with Puppet @ Postgres OpenPostgresOpen
 
Koichi Suzuki - Postgres-XC Dynamic Cluster Management @ Postgres Open
Koichi Suzuki - Postgres-XC Dynamic Cluster  Management @ Postgres OpenKoichi Suzuki - Postgres-XC Dynamic Cluster  Management @ Postgres Open
Koichi Suzuki - Postgres-XC Dynamic Cluster Management @ Postgres OpenPostgresOpen
 
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...PostgresOpen
 
Robert Bernier - Recovering From A Damaged PostgreSQL Cluster @ Postgres Open
Robert Bernier - Recovering From A Damaged PostgreSQL Cluster @ Postgres OpenRobert Bernier - Recovering From A Damaged PostgreSQL Cluster @ Postgres Open
Robert Bernier - Recovering From A Damaged PostgreSQL Cluster @ Postgres OpenPostgresOpen
 
Michael Paquier - Taking advantage of custom bgworkers @ Postgres Open
Michael Paquier - Taking advantage of custom bgworkers @ Postgres OpenMichael Paquier - Taking advantage of custom bgworkers @ Postgres Open
Michael Paquier - Taking advantage of custom bgworkers @ Postgres OpenPostgresOpen
 
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres OpenKevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres OpenPostgresOpen
 
Michael Bayer Introduction to SQLAlchemy @ Postgres Open
Michael Bayer Introduction to SQLAlchemy @ Postgres OpenMichael Bayer Introduction to SQLAlchemy @ Postgres Open
Michael Bayer Introduction to SQLAlchemy @ Postgres OpenPostgresOpen
 
Robert Haas Query Planning Gone Wrong Presentation @ Postgres Open
Robert Haas Query Planning Gone Wrong Presentation @ Postgres OpenRobert Haas Query Planning Gone Wrong Presentation @ Postgres Open
Robert Haas Query Planning Gone Wrong Presentation @ Postgres OpenPostgresOpen
 
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013Ryan Jarvinen Open Shift Talk @ Postgres Open 2013
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013PostgresOpen
 
Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013
Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013
Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013PostgresOpen
 

More from PostgresOpen (18)

Bruce Momjian - Inside PostgreSQL Shared Memory @ Postgres Open
Bruce Momjian - Inside PostgreSQL Shared Memory @ Postgres OpenBruce Momjian - Inside PostgreSQL Shared Memory @ Postgres Open
Bruce Momjian - Inside PostgreSQL Shared Memory @ Postgres Open
 
Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...
Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...
Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...
 
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres Open
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres OpenKeith Fiske - When PostgreSQL Can't, You Can @ Postgres Open
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres Open
 
David Keeney - SQL Database Server Requests from the Browser @ Postgres Open
David Keeney - SQL Database Server Requests from the Browser @ Postgres OpenDavid Keeney - SQL Database Server Requests from the Browser @ Postgres Open
David Keeney - SQL Database Server Requests from the Browser @ Postgres Open
 
Keith Paskett - Postgres on ZFS @ Postgres Open
Keith Paskett - Postgres on ZFS @ Postgres OpenKeith Paskett - Postgres on ZFS @ Postgres Open
Keith Paskett - Postgres on ZFS @ Postgres Open
 
Kevin Kempter - PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter - PostgreSQL Backup and Recovery Methods @ Postgres OpenKevin Kempter - PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter - PostgreSQL Backup and Recovery Methods @ Postgres Open
 
Craig Kerstiens - Scalable Uniques in Postgres @ Postgres Open
Craig Kerstiens - Scalable Uniques in Postgres @ Postgres OpenCraig Kerstiens - Scalable Uniques in Postgres @ Postgres Open
Craig Kerstiens - Scalable Uniques in Postgres @ Postgres Open
 
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...
 
Steve Singer - Managing PostgreSQL with Puppet @ Postgres Open
Steve Singer - Managing PostgreSQL with Puppet @ Postgres OpenSteve Singer - Managing PostgreSQL with Puppet @ Postgres Open
Steve Singer - Managing PostgreSQL with Puppet @ Postgres Open
 
Koichi Suzuki - Postgres-XC Dynamic Cluster Management @ Postgres Open
Koichi Suzuki - Postgres-XC Dynamic Cluster  Management @ Postgres OpenKoichi Suzuki - Postgres-XC Dynamic Cluster  Management @ Postgres Open
Koichi Suzuki - Postgres-XC Dynamic Cluster Management @ Postgres Open
 
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
 
Robert Bernier - Recovering From A Damaged PostgreSQL Cluster @ Postgres Open
Robert Bernier - Recovering From A Damaged PostgreSQL Cluster @ Postgres OpenRobert Bernier - Recovering From A Damaged PostgreSQL Cluster @ Postgres Open
Robert Bernier - Recovering From A Damaged PostgreSQL Cluster @ Postgres Open
 
Michael Paquier - Taking advantage of custom bgworkers @ Postgres Open
Michael Paquier - Taking advantage of custom bgworkers @ Postgres OpenMichael Paquier - Taking advantage of custom bgworkers @ Postgres Open
Michael Paquier - Taking advantage of custom bgworkers @ Postgres Open
 
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres OpenKevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres Open
 
Michael Bayer Introduction to SQLAlchemy @ Postgres Open
Michael Bayer Introduction to SQLAlchemy @ Postgres OpenMichael Bayer Introduction to SQLAlchemy @ Postgres Open
Michael Bayer Introduction to SQLAlchemy @ Postgres Open
 
Robert Haas Query Planning Gone Wrong Presentation @ Postgres Open
Robert Haas Query Planning Gone Wrong Presentation @ Postgres OpenRobert Haas Query Planning Gone Wrong Presentation @ Postgres Open
Robert Haas Query Planning Gone Wrong Presentation @ Postgres Open
 
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013Ryan Jarvinen Open Shift Talk @ Postgres Open 2013
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013
 
Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013
Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013
Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013
 

Recently uploaded

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 

Recently uploaded (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 

John Melesky - Federating Queries Using Postgres FDW @ Postgres Open

  • 1. Federating Queries Using postgres fdw john melesky Rentrak, Inc September 17, 2013
  • 2. Who Am I? A long-time programmer, working with PostgreSQL in the cloud
  • 3. Who Am I? A long-time programmer, working with PostgreSQL in the cloud my butt
  • 4. Who Am I? A long-time programmer, working with PostgreSQL in the cloud my butt Now, a DBA, working with PostgreSQL on real machines with real disks
  • 5. Who Am I? A long-time programmer, working with PostgreSQL in the cloud my butt Now, a DBA, working with PostgreSQL on real machines VMWare with real disks
  • 6. Who Am I? A long-time programmer, working with PostgreSQL in the cloud my butt Now, a DBA, working with PostgreSQL on real machines VMWare with real disks NetApps
  • 7. PostgreSQL inheritance partitioning create table transactions ( id serial, user_id bigint, time_utc timestamp, int_value bigint, txt_value text, primary key (id) ); create table transactions_201306 ( like transactions including indexes, check (time_utc >= ’2013-06-01’ and time_utc < ’2013-07-01’) ) inherits (transactions);
  • 8. PostgreSQL inheritance partitioning create table transactions ( id serial, user_id bigint, time_utc timestamp, int_value bigint, txt_value text, primary key (id) ); create table transactions_201306 ( like transactions including indexes, check (time_utc >= ’2013-06-01’ and time_utc < ’2013-07-01’) ) inherits (transactions); You know this already
  • 9. Old-school partitioning create view transactions as ( select * from transactions_201301 union all select * from transactions_201302 union all select * from transactions_201303 union all select * from transactions_201304 union all ... );
  • 10. Why don’t we still use this?
  • 11. Why don’t we still use this? 1. No insert triggers on views
  • 12. Why don’t we still use this? 1. No insert triggers on views 2. No ”inherit indexes” without additional misdirection
  • 13. Why don’t we still use this? 1. No insert triggers on views 2. No ”inherit indexes” without additional misdirection 3. Basically, we have a better option with inheritence partitioning
  • 14. Postgres Foreign Data Wrapper -- just once create extension postgres_fdw; -- once per data node create server node0 foreign data wrapper postgres_fdw options (connection stuff); create user mapping for app_user server node0; -- once per table per node create foreign table transactions_node0 (table definition) server node0 options (table_name ’transactions’);
  • 15. Federating, Old-school create view transactions as ( select * from transactions_node0 union all select * from transactions_node1 union all select * from transactions_node2 union all select * from transactions_node3 union all ... );
  • 16. Querying primary=# explain select count(*) from transactions; QUERY PLAN --------------------------------------------------------- Aggregate (cost=1767.38..1767.39 rows=1 width=0) -> Append (cost=100.00..1699.12 rows=27304 width=0) -> Foreign Scan on transactions_node0 (cost=100.00..212.39 rows=3413 width=0) -> Foreign Scan on transactions_node1 (cost=100.00..212.39 rows=3413 width=0) -> Foreign Scan on transactions_node2 (cost=100.00..212.39 rows=3413 width=0) -> Foreign Scan on transactions_node3 (cost=100.00..212.39 rows=3413 width=0) -> Foreign Scan on transactions_node4 (cost=100.00..212.39 rows=3413 width=0) ... (10 rows) Time: 1.226 ms
  • 17. Querying primary=# explain verbose select count(*) from transactions; QUERY PLAN ----------------------------------------------------------------- Aggregate (cost=1767.38..1767.39 rows=1 width=0) Output: count(*) -> Append (cost=100.00..1699.12 rows=27304 width=0) -> Foreign Scan on public.transactions_node0 (cost=100.00..212.39 rows=3413 width=0) Remote SQL: SELECT NULL FROM public.transactions -> Foreign Scan on public.transactions_node1 (cost=100.00..212.39 rows=3413 width=0) Remote SQL: SELECT NULL FROM public.transactions -> Foreign Scan on public.transactions_node2 (cost=100.00..212.39 rows=3413 width=0) Remote SQL: SELECT NULL FROM public.transactions ... (19 rows) Time: 1.273 ms
  • 18. Querying primary=# select count(*) from transactions; count --------- 1095336 (1 row) Time: 3035.054 ms
  • 19. Round-robin primary node 0 (id % 4 = 0) node 1 (id % 4 = 1) node 2 (id % 4 = 2) node 3 (id % 4 = 3)
  • 20. Round-robin primary=# create foreign table transactions_node0 ( primary(# id serial, primary(# user_id bigint, primary(# time_utc timestamp, primary(# int_value bigint, primary(# txt_value text, primary(# check ((id % 8) = 0) primary(# ) server node0 primary(# options (table_name ’transactions’); ERROR: constraints are not supported on foreign tables LINE 6: check ((id % 8) = 0)) server node0 ...
  • 21. Domain-based (aka ”sharding”) primary node 0 (customer = 'bigone') node 1 (customer in ('bigtwo', 'bigthree') node 2 (customer in (...)) node 3 (customer in (...))
  • 22. Range-based primary node 0 (date between '2013-01-01' and '2013-01-31') node 1 (date between ...) node 2 (date between ...) node 3 date between ...)
  • 23. Table-based primary node 0 (users table(s)) node 1 (transactions table) node 2 (session tables)
  • 28. Limitations: Network traffic primary=# select count(*) from transactions_local; count --------- 1095336 (1 row) Time: 209.097 ms
  • 29. Limitations: Network traffic primary=# select count(*) from transactions_local; count --------- 1095336 (1 row) Time: 209.097 ms primary=# select count(*) from transactions_primary; count --------- 1095336 (1 row) Time: 2867.385 ms
  • 31. Limitations: Dumb queries primary=# explain verbose select count(*) from transactions; QUERY PLAN ----------------------------------------------------------------- Aggregate (cost=1767.38..1767.39 rows=1 width=0) Output: count(*) -> Append (cost=100.00..1699.12 rows=27304 width=0) -> Foreign Scan on public.transactions_node0 (cost=100.00..212.39 rows=3413 width=0) Remote SQL: SELECT NULL FROM public.transactions ...
  • 32. Limitations: Dumb queries primary=# explain verbose select count(*) from transactions; QUERY PLAN ----------------------------------------------------------------- Aggregate (cost=1767.38..1767.39 rows=1 width=0) Output: count(*) -> Append (cost=100.00..1699.12 rows=27304 width=0) -> Foreign Scan on public.transactions_node0 (cost=100.00..212.39 rows=3413 width=0) Remote SQL: SELECT NULL FROM public.transactions ... primary=# explain verbose select avg(int_value) from transactions; QUERY PLAN -------------------------------------------------------------------------- Aggregate (cost=1545.60..1545.61 rows=1 width=8) Output: avg(transactions_node0.int_value) -> Append (cost=100.00..1494.40 rows=20480 width=8) -> Foreign Scan on public.transactions_node0 (cost=100.00..186.80 rows=2560 width=8) Output: transactions_node0.int_value Remote SQL: SELECT int_value FROM public.transactions ...
  • 33. Limitations: Dumb queries select type, count(*) from users group by type order by 2 desc;
  • 35. Limitations: Joins select count(*) from transactions t, users u where t.user_id = u.id and u.type = ’mistaken’;
  • 38. Limitations: Constraint exclusion Remember this? ERROR: constraints are not supported on foreign tables LINE 6: check ((id % 8) = 0)) server node0 ....
  • 40. Limitations: Single-threaded executer How many nodes do you have?
  • 41. Limitations: Single-threaded executer How many nodes do you have? Do you know what they’re doing?
  • 42. Strategies Large working set, small nodes Node-level partitioning Heavy distributed processing Multi-head
  • 43. Strategy: Large working set, small nodes
  • 44. Strategy: Large working set, small nodes Your working set is larger than one node’s RAM
  • 45. Strategy: Large working set, small nodes Your working set is larger than one node’s RAM ... but you have lots of nodes
  • 46. Strategy: Large working set, small nodes Your working set is larger than one node’s RAM ... but you have lots of nodes (and network is faster than disk)
  • 47. Strategy: Large working set, small nodes Your working set is larger than one node’s RAM ... but you have lots of nodes (and network is faster than disk) This might be worth looking into if you’re on AWS, but please, please test it first
  • 48. Strategy: Node-level partitioning Like parititioning, but with a separate node per partition group!
  • 49. Strategy: Node-level partitioning Like parititioning, but with a separate node per partition group! As a total strategy, this is probably not worthwhile. However, it can work with a fast ”current data” node combining with slower ”archived data” nodes.
  • 51. Heavy distributed processing Take advantage of lots of CPUs
  • 52. Heavy distributed processing Take advantage of lots of CPUs Works well when you have node-discrete workloads
  • 53. Heavy distributed processing Take advantage of lots of CPUs Works well when you have node-discrete workloads Lock management can become a bit hairier
  • 54. Heavy distributed processing Take advantage of lots of CPUs Works well when you have node-discrete workloads Lock management can become a bit hairier This might actually be a useful use case
  • 56. Multi-headed Like replication, but with no overhead or delay!
  • 57. Multi-headed Like replication, but with no overhead or delay! Also, no storage overhead!
  • 58. Multi-headed Like replication, but with no overhead or delay! Also, no storage overhead! Might work well with the distributed processing setup
  • 59. Multi-headed Like replication, but with no overhead or delay! Also, no storage overhead! Might work well with the distributed processing setup In fact, given the overhead that lands on the head node, it might be necessary for a working FDW federation setup
  • 61. Pan-Strategy Advice Think very carefully about what tables should live where
  • 62. Pan-Strategy Advice Think very carefully about what tables should live where Think very carefully about tuning settings (especially on your head node) work mem shared buffers temp buffers
  • 63. Pan-Strategy Advice Think very carefully about what tables should live where Think very carefully about tuning settings (especially on your head node) work mem shared buffers temp buffers Think very carefully about how many data nodes you want
  • 64. Pan-Strategy Advice Think very carefully about what tables should live where Think very carefully about tuning settings (especially on your head node) work mem shared buffers temp buffers Think very carefully about how many data nodes you want Think very carefully about network vs. disk vs. dumb-query costs
  • 65. Pan-Strategy Advice Think very carefully about what tables should live where Think very carefully about tuning settings (especially on your head node) work mem shared buffers temp buffers Think very carefully about how many data nodes you want Think very carefully about network vs. disk vs. dumb-query costs Think very carefully!
  • 68. Questions? Any questions? John, do you use this approach for your databases?
  • 69. Questions? Any questions? John, do you use this approach for your databases? Why not?
  • 71. Thanks! Plug: Stephen Frost has another postgres fdw talk tomorrow
  • 72. Thanks! Plug: Stephen Frost has another postgres fdw talk tomorrow Also: Rentrak is hiring: programmers, sysadmins, and devops
  • 73. Federating Queries Using postgres fdw Introduction Who am I? Partitioning PostgreSQL inheritance partitioning Old-school partitioning Federating Queries Federation Strategies Overview Trial and Error Demo Limitations Strategies Wrap-up