SlideShare a Scribd company logo
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
WITH FROM
Thu 27 February at 10am PT
Using Postgres & Citus
for Lightning Fast
Analytics
PRESENTED BY:
SAI
SRIRAMPUR
LIVE DEMO
Sai Srirampur | Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
Ask private questions in
Q&A panel (mouseover at
bottom to see Q&A icon)
We plan to do 1-2 quick
polls.
Logistics
X
Sai Srirampur | PyConCA 2018
• Sai Srirampur a.k.a Sai
• Engineer at Citus Data
(now part of the Microsoft family!!)
• Joined Citus to make it so
developers never have to
worry about scaling their
database
• Recently got married!
• Follow me @saisrirampur
@citusdata
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
Does
this
sound
like
you?
Hitting resource limits
with single-node
Postgres, but don’t want
to give up Postgres
1
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
Want to reduce dev costs
by consolidating—&
avoid separate stores for
analytics (OLAP) &
transactional workloads
(OLTP)
Does
this
sound
like
you?
2
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
Does
this
sound
like
you?
Pre-aggregation or rollup
pipeline lags and never
catches up
3
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
Why ! Postgres? TLDR;
Open source
Constraints
Extensions
PostGIS / Geospatial
HLL, TopN, Citus
Foreign data wrappers
Rich SQL
CTEs
Window functions
Full text search
Datatypes
JSONB
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
Q: Why Citus?
A: Citus transforms Postgres into a
distributed database
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
TLDR; on scaling out Postgres w/Citus
1. Distributes data across multiple nodes
2. More memory, cpu, disk + parallelization
3. Extension to Postgres (not a fork)
DATABASE AS A SERVICE ENTERPRISE SOFTWARE OPEN SOURCE
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 201911
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
What is a rollup?
Period Customer Country Site Hit Count
SELECT…
Pre-computed aggregates for a period and set of (group by)
dimensions.
Can be further filtered and aggregated to generate charts.
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
What are the benefits of rollups?
• Fast (indexed) lookups of aggregates
• Avoid expensive repeated computation
• Rollups can be further aggregated
• Rollups are compact, can be kept over longer periods
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
What is hll?
• Approximation algorithm (“sketch” algorithm)
• Estimates COUNT(DISTINCT)/cardinality of given data
• Extension on postgres: hll
• hll data type to store distinct values
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
Already provisioned a 4-node Citus database cluster
for today’s demo / & regular Postgres on single node
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
Load data
Create indexes (btree and GIN)
Query patterns in analytics workload
Rollup queries
What I will show you in today’s analytics demo?
Citus 4-
node
cluster
Single
node
Postgres
TOP
BOTTOM
Load data
Create indexes (btree and GIN)
Query patterns in analytics workload
Rollup queries
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
Sai Srirampur | PyConCA 2018
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
1/ Parallelism
2/ Linear scale
3/ Freshness (real-time, concurrency)
4/ Both transactional && analytics
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
1/ Faster rollups - parallelism - no lag
2/ Increase granularity of period
3/ Store and query longer periods of data
4/ Extensions - hll, topn, pg_cron, pg_partman
Enhance your rollup pipeline with
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
Sai Srirampur | PyConCA 2018
citusdata.com/customers/heap
citusdata.com/customers/heap
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 201922
citusdata.com/customers/algolia
Scaling Postgres for Time Series Data with Citus | Nov 15 2018 | Marco Slot | Claire Giordano
Using Postgres and Citus for Lightning Fast Analytics | February 2019
Min Wei of
Microsoft
Scaling Postgres for Time Series Data with Citus | Nov 15 2018 | Marco Slot | Claire Giordano
Using Postgres and Citus for Lightning Fast Analytics | February 2019
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 201926
Any Questions?? (And, resources)
DOWNLOAD CITUS OPEN SOURCE:
https://www.citusdata.com/download
CREATE CITUS CLOUD DEV ACCOUNT:
https://www.citusdata.com/product/cloud
JOIN OUR PUBLIC SLACK:
https://slack.citusdata.com/
Live Demo of Citus Cloud | July 2018
www.citusdata.com @citusdata
© 2019 Citus Data. All rights reserved.
Sai Srirampur | @saisrirampur
Thank you for your time

More Related Content

What's hot (20)

PDF
Building real time analytics applications using pinot : A LinkedIn case study
Kishore Gopalakrishna
 
PDF
AI on Spark for Malware Analysis and Anomalous Threat Detection
Databricks
 
PDF
Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...
Spark Summit
 
PDF
Spark and the Future of Advanced Analytics by Thomas Dinsmore
Spark Summit
 
PDF
Reliable Performance at Scale with Apache Spark on Kubernetes
Databricks
 
PDF
OAP: Optimized Analytics Package for Spark Platform with Daoyuan Wang and Yua...
Databricks
 
PPTX
Putting Lipstick on Apache Pig at Netflix
Jeff Magnusson
 
PDF
Analyzing IOT Data in Apache Spark Across Data Centers and Cloud with NetApp ...
Databricks
 
PDF
Data Warehousing with Spark Streaming at Zalando
Databricks
 
PDF
Kylin and Druid Presentation
argonauts007
 
PDF
Apache Spark Listeners: A Crash Course in Fast, Easy Monitoring
Databricks
 
PDF
Spark Autotuning: Spark Summit East talk by Lawrence Spracklen
Spark Summit
 
PDF
Debugging Big Data Analytics in Apache Spark with BigDebug with Muhammad Gulz...
Databricks
 
PDF
Bringing HPC Algorithms to Big Data Platforms: Spark Summit East talk by Niko...
Spark Summit
 
PDF
Bridging the Gap Between Data Scientists and Software Engineers – Deploying L...
Databricks
 
PDF
How to use Parquet as a Sasis for ETL and Analytics
DataWorks Summit
 
PDF
Realtime Data Analysis Patterns
Mikio L. Braun
 
PDF
Make your PySpark Data Fly with Arrow!
Databricks
 
PDF
Performance Analysis of Apache Spark and Presto in Cloud Environments
Databricks
 
PDF
Using SparkML to Power a DSaaS (Data Science as a Service) with Kiran Muglurm...
Databricks
 
Building real time analytics applications using pinot : A LinkedIn case study
Kishore Gopalakrishna
 
AI on Spark for Malware Analysis and Anomalous Threat Detection
Databricks
 
Unified Framework for Real Time, Near Real Time and Offline Analysis of Video...
Spark Summit
 
Spark and the Future of Advanced Analytics by Thomas Dinsmore
Spark Summit
 
Reliable Performance at Scale with Apache Spark on Kubernetes
Databricks
 
OAP: Optimized Analytics Package for Spark Platform with Daoyuan Wang and Yua...
Databricks
 
Putting Lipstick on Apache Pig at Netflix
Jeff Magnusson
 
Analyzing IOT Data in Apache Spark Across Data Centers and Cloud with NetApp ...
Databricks
 
Data Warehousing with Spark Streaming at Zalando
Databricks
 
Kylin and Druid Presentation
argonauts007
 
Apache Spark Listeners: A Crash Course in Fast, Easy Monitoring
Databricks
 
Spark Autotuning: Spark Summit East talk by Lawrence Spracklen
Spark Summit
 
Debugging Big Data Analytics in Apache Spark with BigDebug with Muhammad Gulz...
Databricks
 
Bringing HPC Algorithms to Big Data Platforms: Spark Summit East talk by Niko...
Spark Summit
 
Bridging the Gap Between Data Scientists and Software Engineers – Deploying L...
Databricks
 
How to use Parquet as a Sasis for ETL and Analytics
DataWorks Summit
 
Realtime Data Analysis Patterns
Mikio L. Braun
 
Make your PySpark Data Fly with Arrow!
Databricks
 
Performance Analysis of Apache Spark and Presto in Cloud Environments
Databricks
 
Using SparkML to Power a DSaaS (Data Science as a Service) with Kiran Muglurm...
Databricks
 

Similar to Using Postgres and Citus for Lightning Fast Analytics, also ft. Rollups | Live Demo | Sai Srirampur (20)

PDF
The State of Postgres | Strata San Jose 2018 | Umur Cubukcu
Citus Data
 
PPTX
SplunkLive! Frankfurt 2018 - Integrating Metrics & Logs
Splunk
 
PPTX
Apache AGE and the synergy effect in the combination of Postgres and NoSQL
EDB
 
PDF
Data Engineer's Lunch 96: Intro to Real Time Analytics Using Apache Pinot
Anant Corporation
 
PDF
Data Engineer's Lunch 96: Intro to Real Time Analytics Using Apache Pinot
Anant Corporation
 
PDF
Before vs After: Redesigning a Website to be Useful and Informative for Devel...
Teresa Giacomini
 
PDF
INTERFACE, by apidays - The Evolution of Data Movement.pdf
apidays
 
PPTX
[Webinar] Measure Twice, Build Once: Real-Time Predictive Analytics
Infochimps, a CSC Big Data Business
 
PDF
IRJET- Analysis of Boston’s Crime Data using Apache Pig
IRJET Journal
 
PPTX
SplunkLive! Munich 2018: Integrating Metrics and Logs
Splunk
 
PDF
Newest mmis resume
Supratik Chanda
 
PDF
Combinação de logs, métricas e rastreamentos para observabilidade unificada
Elasticsearch
 
PDF
Denys Kovalenko "Scaling Data Science at Bolt"
Fwdays
 
PDF
Unlocking the Power of Python in Data Analytics
pallavichauhan2525
 
PDF
Tuning for Systematic Trading: Talk 2: Deep Learning
SigOpt
 
PDF
Combining Logs, Metrics, and Traces for Unified Observability
Elasticsearch
 
PPTX
ODSC18, London, How to build high performing weighted XGBoost ML Model for Re...
Alok Singh
 
PPTX
StasD & Graphite - Measure anything, Measure Everything
Avi Revivo
 
PDF
M|18 GPU Accelerated Data Processing
MariaDB plc
 
PPTX
SplunkLive! Paris 2018: Integrating Metrics and Logs
Splunk
 
The State of Postgres | Strata San Jose 2018 | Umur Cubukcu
Citus Data
 
SplunkLive! Frankfurt 2018 - Integrating Metrics & Logs
Splunk
 
Apache AGE and the synergy effect in the combination of Postgres and NoSQL
EDB
 
Data Engineer's Lunch 96: Intro to Real Time Analytics Using Apache Pinot
Anant Corporation
 
Data Engineer's Lunch 96: Intro to Real Time Analytics Using Apache Pinot
Anant Corporation
 
Before vs After: Redesigning a Website to be Useful and Informative for Devel...
Teresa Giacomini
 
INTERFACE, by apidays - The Evolution of Data Movement.pdf
apidays
 
[Webinar] Measure Twice, Build Once: Real-Time Predictive Analytics
Infochimps, a CSC Big Data Business
 
IRJET- Analysis of Boston’s Crime Data using Apache Pig
IRJET Journal
 
SplunkLive! Munich 2018: Integrating Metrics and Logs
Splunk
 
Newest mmis resume
Supratik Chanda
 
Combinação de logs, métricas e rastreamentos para observabilidade unificada
Elasticsearch
 
Denys Kovalenko "Scaling Data Science at Bolt"
Fwdays
 
Unlocking the Power of Python in Data Analytics
pallavichauhan2525
 
Tuning for Systematic Trading: Talk 2: Deep Learning
SigOpt
 
Combining Logs, Metrics, and Traces for Unified Observability
Elasticsearch
 
ODSC18, London, How to build high performing weighted XGBoost ML Model for Re...
Alok Singh
 
StasD & Graphite - Measure anything, Measure Everything
Avi Revivo
 
M|18 GPU Accelerated Data Processing
MariaDB plc
 
SplunkLive! Paris 2018: Integrating Metrics and Logs
Splunk
 
Ad

More from Citus Data (20)

PDF
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
Citus Data
 
PDF
JSONB Tricks: Operators, Indexes, and When (Not) to Use It | PostgresOpen 201...
Citus Data
 
PDF
Tutorial: Implementing your first Postgres extension | PGConf EU 2019 | Burak...
Citus Data
 
PDF
Whats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Citus Data
 
PDF
When it all goes wrong | PGConf EU 2019 | Will Leinweber
Citus Data
 
PDF
Amazing SQL your ORM can (or can't) do | PGConf EU 2019 | Louise Grandjonc
Citus Data
 
PDF
What Microsoft is doing with Postgres & the Citus Data acquisition | PGConf E...
Citus Data
 
PDF
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
Citus Data
 
PDF
Why Postgres Why This Database Why Now | SF Bay Area Postgres Meetup | Claire...
Citus Data
 
PDF
A story on Postgres index types | PostgresLondon 2019 | Louise Grandjonc
Citus Data
 
PDF
Why developers need marketing now more than ever | GlueCon 2019 | Claire Gior...
Citus Data
 
PDF
The Art of PostgreSQL | PostgreSQL Ukraine | Dimitri Fontaine
Citus Data
 
PDF
When it all goes wrong (with Postgres) | RailsConf 2019 | Will Leinweber
Citus Data
 
PDF
The Art of PostgreSQL | PostgreSQL Ukraine Meetup | Dimitri Fontaine
Citus Data
 
PDF
How to write SQL queries | pgDay Paris 2019 | Dimitri Fontaine
Citus Data
 
PDF
When it all Goes Wrong |Nordic PGDay 2019 | Will Leinweber
Citus Data
 
PDF
Why PostgreSQL Why This Database Why Now | Nordic PGDay 2019 | Claire Giordano
Citus Data
 
PDF
Scaling Multi-Tenant Applications Using the Django ORM & Postgres | PyCaribbe...
Citus Data
 
PDF
Data Modeling, Normalization, and Denormalisation | FOSDEM '19 | Dimitri Font...
Citus Data
 
PDF
Five data models for sharding and which is right | PGConf.ASIA 2018 | Craig K...
Citus Data
 
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
Citus Data
 
JSONB Tricks: Operators, Indexes, and When (Not) to Use It | PostgresOpen 201...
Citus Data
 
Tutorial: Implementing your first Postgres extension | PGConf EU 2019 | Burak...
Citus Data
 
Whats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Citus Data
 
When it all goes wrong | PGConf EU 2019 | Will Leinweber
Citus Data
 
Amazing SQL your ORM can (or can't) do | PGConf EU 2019 | Louise Grandjonc
Citus Data
 
What Microsoft is doing with Postgres & the Citus Data acquisition | PGConf E...
Citus Data
 
Deep Postgres Extensions in Rust | PGCon 2019 | Jeff Davis
Citus Data
 
Why Postgres Why This Database Why Now | SF Bay Area Postgres Meetup | Claire...
Citus Data
 
A story on Postgres index types | PostgresLondon 2019 | Louise Grandjonc
Citus Data
 
Why developers need marketing now more than ever | GlueCon 2019 | Claire Gior...
Citus Data
 
The Art of PostgreSQL | PostgreSQL Ukraine | Dimitri Fontaine
Citus Data
 
When it all goes wrong (with Postgres) | RailsConf 2019 | Will Leinweber
Citus Data
 
The Art of PostgreSQL | PostgreSQL Ukraine Meetup | Dimitri Fontaine
Citus Data
 
How to write SQL queries | pgDay Paris 2019 | Dimitri Fontaine
Citus Data
 
When it all Goes Wrong |Nordic PGDay 2019 | Will Leinweber
Citus Data
 
Why PostgreSQL Why This Database Why Now | Nordic PGDay 2019 | Claire Giordano
Citus Data
 
Scaling Multi-Tenant Applications Using the Django ORM & Postgres | PyCaribbe...
Citus Data
 
Data Modeling, Normalization, and Denormalisation | FOSDEM '19 | Dimitri Font...
Citus Data
 
Five data models for sharding and which is right | PGConf.ASIA 2018 | Craig K...
Citus Data
 
Ad

Recently uploaded (20)

PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 

Using Postgres and Citus for Lightning Fast Analytics, also ft. Rollups | Live Demo | Sai Srirampur

  • 1. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 WITH FROM Thu 27 February at 10am PT Using Postgres & Citus for Lightning Fast Analytics PRESENTED BY: SAI SRIRAMPUR LIVE DEMO
  • 2. Sai Srirampur | Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 Ask private questions in Q&A panel (mouseover at bottom to see Q&A icon) We plan to do 1-2 quick polls. Logistics X
  • 3. Sai Srirampur | PyConCA 2018 • Sai Srirampur a.k.a Sai • Engineer at Citus Data (now part of the Microsoft family!!) • Joined Citus to make it so developers never have to worry about scaling their database • Recently got married! • Follow me @saisrirampur @citusdata
  • 4. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 Does this sound like you? Hitting resource limits with single-node Postgres, but don’t want to give up Postgres 1
  • 5. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 Want to reduce dev costs by consolidating—& avoid separate stores for analytics (OLAP) & transactional workloads (OLTP) Does this sound like you? 2
  • 6. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 Does this sound like you? Pre-aggregation or rollup pipeline lags and never catches up 3
  • 7. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
  • 8. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 Why ! Postgres? TLDR; Open source Constraints Extensions PostGIS / Geospatial HLL, TopN, Citus Foreign data wrappers Rich SQL CTEs Window functions Full text search Datatypes JSONB
  • 9. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 Q: Why Citus? A: Citus transforms Postgres into a distributed database
  • 10. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 TLDR; on scaling out Postgres w/Citus 1. Distributes data across multiple nodes 2. More memory, cpu, disk + parallelization 3. Extension to Postgres (not a fork) DATABASE AS A SERVICE ENTERPRISE SOFTWARE OPEN SOURCE
  • 11. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 201911
  • 12. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
  • 13. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 What is a rollup? Period Customer Country Site Hit Count SELECT… Pre-computed aggregates for a period and set of (group by) dimensions. Can be further filtered and aggregated to generate charts.
  • 14. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 What are the benefits of rollups? • Fast (indexed) lookups of aggregates • Avoid expensive repeated computation • Rollups can be further aggregated • Rollups are compact, can be kept over longer periods
  • 15. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 What is hll? • Approximation algorithm (“sketch” algorithm) • Estimates COUNT(DISTINCT)/cardinality of given data • Extension on postgres: hll • hll data type to store distinct values
  • 16. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 Already provisioned a 4-node Citus database cluster for today’s demo / & regular Postgres on single node
  • 17. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 Load data Create indexes (btree and GIN) Query patterns in analytics workload Rollup queries What I will show you in today’s analytics demo? Citus 4- node cluster Single node Postgres TOP BOTTOM Load data Create indexes (btree and GIN) Query patterns in analytics workload Rollup queries
  • 18. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 Sai Srirampur | PyConCA 2018
  • 19. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 1/ Parallelism 2/ Linear scale 3/ Freshness (real-time, concurrency) 4/ Both transactional && analytics
  • 20. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 1/ Faster rollups - parallelism - no lag 2/ Increase granularity of period 3/ Store and query longer periods of data 4/ Extensions - hll, topn, pg_cron, pg_partman Enhance your rollup pipeline with
  • 21. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019 Sai Srirampur | PyConCA 2018 citusdata.com/customers/heap citusdata.com/customers/heap
  • 22. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 201922 citusdata.com/customers/algolia
  • 23. Scaling Postgres for Time Series Data with Citus | Nov 15 2018 | Marco Slot | Claire Giordano Using Postgres and Citus for Lightning Fast Analytics | February 2019 Min Wei of Microsoft
  • 24. Scaling Postgres for Time Series Data with Citus | Nov 15 2018 | Marco Slot | Claire Giordano Using Postgres and Citus for Lightning Fast Analytics | February 2019
  • 25. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 2019
  • 26. Live Demo of Using Postgres and Citus for Lightning Fast Analytics, also featuring Rollups | March 201926 Any Questions?? (And, resources) DOWNLOAD CITUS OPEN SOURCE: https://www.citusdata.com/download CREATE CITUS CLOUD DEV ACCOUNT: https://www.citusdata.com/product/cloud JOIN OUR PUBLIC SLACK: https://slack.citusdata.com/
  • 27. Live Demo of Citus Cloud | July 2018 www.citusdata.com @citusdata © 2019 Citus Data. All rights reserved. Sai Srirampur | @saisrirampur Thank you for your time