SlideShare a Scribd company logo
Migrating to Postgresql
For Charlotte SQL Saturday on 12/07/2019
By Ramu Pulipati
Thank You to our Sponsors
About Me
Cofounder / CTO at Botsplash
Software-as-a-service and hosted
messaging platform to engage
businesses and customers. botsplash.com
What is Postgresql?
• Free & Open Source RDMS
• Alternative to Microsoft SQL Server, MySQL, Oracle, Mongo
DB or any RDBMS and NoSQL databases
• Battle tested for over 30 years with continuous
improvements to support modern applications
DERIVED
Who uses
PostgreSQL?
EXTENSIONS
Why Postgresql?
• BSD License
• Free for Commercial use
• No vendor Lock-in
• Predictable releases & fixes
• Active Community
• Great Performance
• Extensibility
• Hosted options
• Professional Services
Source: postgresql.org
Differentiators
• Strong SQL Types
• Rich JSON Support / NoSQL
• Native Table Partitioning
• Full Text Search
• Pubsub
• GIS / Spatial Functionality
• Scalability & Multi-tenancy
• Extensibility
80%
Commercial
Databases
Postgresql
Trends
Source: Stackoverflow from
Igal Sapir slides
Compare with others
• Replaces
• Mongo Db
• SQL Server
• MySQL
• Oracle
• Complements
• Redis
• Elasticsearch
• Clickhouse
Source: NoSQL Performance Benchmark 02/27/2018
History & What’s new Version Major Feature
V12
10/03/2019
JSONB Query & Partition
Improvements, Performance
V11
10/18/2018
Query Parallelism Improvements
Just-in-time compilation
V10
10/05/2017
Declarative Table Partitions
Logical Replication
Improved Monitoring and Control
V9.6
09/29/2016
Parallel Query
Foreign Data Wrappers
Replication
V9.5
07/01/2016
JSONB Modifying Operators
Row level security
UPSERT statement
V9.4
12/18/2014
Introduce JSONB
Materialized View Improvements
Source: Postgresql Releases
Getting Started
• Download and Install
• Postgres 11+ supports Windows
2012 R2 deployment.
• Cloud hosting options
• Client
• pgAdmin
• psql command line
SQL Support
• Case Sensitive Schema Names
• Case Sensitive Data Storage
• Type casting & Operators
• Date Time formatting
• Common Table Expressions
• Array Data Types
• Upserts
• Stored Procedures
• Multiple languages support
Common Data Types
Data Type Commonly Used Names
Number Smallint, integer, Bigint, decimal, Money
Number (auto) Serial, BigSerial
Enum Enum data types stored
Character Char, nchar, Text
Binary Bytea
Date Time Timestamp with timezone, Timestamp without Timezone, interval
Collections Array, JSON, JSONB
Misc Boolean, UUID, Geo Types, Network Address Mac Address, Custom Types
Full Text Search TsVector, TsQuery
See details from tutorials point
Special Data Types
• Collections
• Arrays
• Range Types
• Searchable
• Indexable
• Aggregate functions
Credit: Igal Sapir slides
JSON Datatypes
• Equivalent to embedded MongoDB
Credit: postgresql documentation
Notable Functions Description
::JSONB Casting
|| or JSONB_SET or
JSONB_BUILD_OBJECT
Build or set JSONB values
JSONB_AGG &
JSONB_BUILD_ARRAY
Aggregate functions
JSONB_PATH_*,
JSONB_EACH,
JSONB_EXTRACT
Path & Extract Functions
JSONB DEMO
Advanced Data Types
• Pivot Tables crosstab function
• Materialized Views
• HStore
• EXPLAIN ANALYZE
• Pg_stat
• XML Columns (not much used)
Concurrency - MVCC
• Postgres uses “Multi-version concurrency control”.
• Isolation at “read-committed” level
• Row level locks are explicit
• Same technique used in Oracle, CouchDB, etc
Indexes
• Index Support
• Single Column / Exact Matches
• Multi Column
• Unique
• Partial Indexes
• Expression Indexes
• Implicit Indexes (PK, UK)
Credit: Igal Sapir slides
Disadvantages / Limits
• Database only solution
• Few available tools
compared to commercial
• Limited Talent Pool
Source: https://www.youtube.com/watch?v=6p2TNPabt6M
Source: Postgres limits from sreenstepslive.com
Best Practices
• Performance Optimization
• Do not read from Database at all
• Use indexes efficiently
• Use pg_stats collector to monitor usage and performance
• Vacuum regularly to clean up storage
• Bench mark hardware and optimize pg parameters
• Always use SSL for connectivity in untrusted networks
Reasons to Fill Out Session Evaluations
Helps Speakers
Helps Organizers
Helps You!
References and Follow up
• Postgresql Documentatoin
• Igal Sapir Postgresql Presentation
• Introduction to Postgresql slideshare
• The Internals of Postgresql
• Postgresql excercises
• MVCC: postgres internals or interdb
Questions? Contact me at ramu@botsplash.com

More Related Content

What's hot

Bn 1016 demo postgre sql-online-training
Bn 1016 demo  postgre sql-online-trainingBn 1016 demo  postgre sql-online-training
Bn 1016 demo postgre sql-online-training
conline training
 
PGDay.Seoul 2016 lightingtalk
PGDay.Seoul 2016 lightingtalkPGDay.Seoul 2016 lightingtalk
PGDay.Seoul 2016 lightingtalk
hyeongchae lee
 
Microsoft Hekaton
Microsoft HekatonMicrosoft Hekaton
Microsoft Hekaton
Siraj Memon
 
Presto updates to 0.178
Presto updates to 0.178Presto updates to 0.178
Presto updates to 0.178
Kai Sasaki
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
Marin Dimitrov
 
Postgres_9.0 vs MySQL_5.5
Postgres_9.0 vs MySQL_5.5Postgres_9.0 vs MySQL_5.5
Postgres_9.0 vs MySQL_5.5
Trieu Dao Minh
 
How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case
Kai Sasaki
 
Presto
PrestoPresto
Presto
Knoldus Inc.
 
In memory databases presentation
In memory databases presentationIn memory databases presentation
In memory databases presentation
Michael Keane
 
No SQL and MongoDB - Hyderabad Scalability Meetup
No SQL and MongoDB - Hyderabad Scalability MeetupNo SQL and MongoDB - Hyderabad Scalability Meetup
No SQL and MongoDB - Hyderabad Scalability Meetup
Hyderabad Scalability Meetup
 
Presto At Treasure Data
Presto At Treasure DataPresto At Treasure Data
Presto At Treasure Data
Taro L. Saito
 
Introduction to Postrges-XC
Introduction to Postrges-XCIntroduction to Postrges-XC
Introduction to Postrges-XC
Ashutosh Bapat
 
Introduction to Presto at Treasure Data
Introduction to Presto at Treasure DataIntroduction to Presto at Treasure Data
Introduction to Presto at Treasure Data
Taro L. Saito
 
In-memory Databases
In-memory DatabasesIn-memory Databases
In-memory Databases
Robert Friberg
 
What database
What databaseWhat database
What database
Regunath B
 
Drill architecture 20120913
Drill architecture 20120913Drill architecture 20120913
Drill architecture 20120913
jasonfrantz
 
The Great Debate: PostgreSQL vs MySQL
The Great Debate: PostgreSQL vs MySQLThe Great Debate: PostgreSQL vs MySQL
The Great Debate: PostgreSQL vs MySQL
EDB
 
What's New in PostgreSQL 9.6
What's New in PostgreSQL 9.6What's New in PostgreSQL 9.6
What's New in PostgreSQL 9.6
EDB
 
MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)
MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)
MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)
MongoDB
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introduction
Pooyan Mehrparvar
 

What's hot (20)

Bn 1016 demo postgre sql-online-training
Bn 1016 demo  postgre sql-online-trainingBn 1016 demo  postgre sql-online-training
Bn 1016 demo postgre sql-online-training
 
PGDay.Seoul 2016 lightingtalk
PGDay.Seoul 2016 lightingtalkPGDay.Seoul 2016 lightingtalk
PGDay.Seoul 2016 lightingtalk
 
Microsoft Hekaton
Microsoft HekatonMicrosoft Hekaton
Microsoft Hekaton
 
Presto updates to 0.178
Presto updates to 0.178Presto updates to 0.178
Presto updates to 0.178
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
 
Postgres_9.0 vs MySQL_5.5
Postgres_9.0 vs MySQL_5.5Postgres_9.0 vs MySQL_5.5
Postgres_9.0 vs MySQL_5.5
 
How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case
 
Presto
PrestoPresto
Presto
 
In memory databases presentation
In memory databases presentationIn memory databases presentation
In memory databases presentation
 
No SQL and MongoDB - Hyderabad Scalability Meetup
No SQL and MongoDB - Hyderabad Scalability MeetupNo SQL and MongoDB - Hyderabad Scalability Meetup
No SQL and MongoDB - Hyderabad Scalability Meetup
 
Presto At Treasure Data
Presto At Treasure DataPresto At Treasure Data
Presto At Treasure Data
 
Introduction to Postrges-XC
Introduction to Postrges-XCIntroduction to Postrges-XC
Introduction to Postrges-XC
 
Introduction to Presto at Treasure Data
Introduction to Presto at Treasure DataIntroduction to Presto at Treasure Data
Introduction to Presto at Treasure Data
 
In-memory Databases
In-memory DatabasesIn-memory Databases
In-memory Databases
 
What database
What databaseWhat database
What database
 
Drill architecture 20120913
Drill architecture 20120913Drill architecture 20120913
Drill architecture 20120913
 
The Great Debate: PostgreSQL vs MySQL
The Great Debate: PostgreSQL vs MySQLThe Great Debate: PostgreSQL vs MySQL
The Great Debate: PostgreSQL vs MySQL
 
What's New in PostgreSQL 9.6
What's New in PostgreSQL 9.6What's New in PostgreSQL 9.6
What's New in PostgreSQL 9.6
 
MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)
MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)
MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introduction
 

Similar to Migrating to postgresql

mongodb_DS.pptx
mongodb_DS.pptxmongodb_DS.pptx
mongodb_DS.pptx
DavoudSalehi1
 
CosmosDB.pptx
CosmosDB.pptxCosmosDB.pptx
CosmosDB.pptx
Udaiappa Ramachandran
 
NoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLNoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQL
EDB
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8
Derek Jacoby
 
MongoDB Basics
MongoDB BasicsMongoDB Basics
MongoDB Basics
Sarang Shravagi
 
Mongo DB
Mongo DB Mongo DB
NoSQL for SQL Server Developers using Couchbase
NoSQL for SQL Server Developers using CouchbaseNoSQL for SQL Server Developers using Couchbase
NoSQL for SQL Server Developers using Couchbase
Brant Burnett
 
Mongo db 3.4 Overview
Mongo db 3.4 OverviewMongo db 3.4 Overview
Mongo db 3.4 Overview
Norberto Leite
 
Drupal meets PostgreSQL for DrupalCamp MSK 2014
Drupal meets PostgreSQL for DrupalCamp MSK 2014Drupal meets PostgreSQL for DrupalCamp MSK 2014
Drupal meets PostgreSQL for DrupalCamp MSK 2014
Kate Marshalkina
 
No sql Database
No sql DatabaseNo sql Database
No sql Database
mymail2ashok
 
Javascript on Server-Side
Javascript on Server-SideJavascript on Server-Side
Javascript on Server-Side
ASIMYILDIZ
 
Azure - Data Platform
Azure - Data PlatformAzure - Data Platform
Azure - Data Platform
giventocode
 
MongoDB
MongoDBMongoDB
CosmosDB for DBAs & Developers
CosmosDB for DBAs & DevelopersCosmosDB for DBAs & Developers
CosmosDB for DBAs & Developers
Niko Neugebauer
 
3 CityNetConf - sql+c#=u-sql
3 CityNetConf - sql+c#=u-sql3 CityNetConf - sql+c#=u-sql
3 CityNetConf - sql+c#=u-sql
Łukasz Grala
 
Document db
Document dbDocument db
NoSQL on ACID - Meet Unstructured Postgres
NoSQL on ACID - Meet Unstructured PostgresNoSQL on ACID - Meet Unstructured Postgres
NoSQL on ACID - Meet Unstructured Postgres
EDB
 
Introduction to azure document db
Introduction to azure document dbIntroduction to azure document db
Introduction to azure document db
Antonios Chatzipavlis
 
Azure Cosmos DB: Features, Practical Use and Optimization "
Azure Cosmos DB: Features, Practical Use and Optimization "Azure Cosmos DB: Features, Practical Use and Optimization "
Azure Cosmos DB: Features, Practical Use and Optimization "
GlobalLogic Ukraine
 
U-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersU-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for Developers
Michael Rys
 

Similar to Migrating to postgresql (20)

mongodb_DS.pptx
mongodb_DS.pptxmongodb_DS.pptx
mongodb_DS.pptx
 
CosmosDB.pptx
CosmosDB.pptxCosmosDB.pptx
CosmosDB.pptx
 
NoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQLNoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQL
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8
 
MongoDB Basics
MongoDB BasicsMongoDB Basics
MongoDB Basics
 
Mongo DB
Mongo DB Mongo DB
Mongo DB
 
NoSQL for SQL Server Developers using Couchbase
NoSQL for SQL Server Developers using CouchbaseNoSQL for SQL Server Developers using Couchbase
NoSQL for SQL Server Developers using Couchbase
 
Mongo db 3.4 Overview
Mongo db 3.4 OverviewMongo db 3.4 Overview
Mongo db 3.4 Overview
 
Drupal meets PostgreSQL for DrupalCamp MSK 2014
Drupal meets PostgreSQL for DrupalCamp MSK 2014Drupal meets PostgreSQL for DrupalCamp MSK 2014
Drupal meets PostgreSQL for DrupalCamp MSK 2014
 
No sql Database
No sql DatabaseNo sql Database
No sql Database
 
Javascript on Server-Side
Javascript on Server-SideJavascript on Server-Side
Javascript on Server-Side
 
Azure - Data Platform
Azure - Data PlatformAzure - Data Platform
Azure - Data Platform
 
MongoDB
MongoDBMongoDB
MongoDB
 
CosmosDB for DBAs & Developers
CosmosDB for DBAs & DevelopersCosmosDB for DBAs & Developers
CosmosDB for DBAs & Developers
 
3 CityNetConf - sql+c#=u-sql
3 CityNetConf - sql+c#=u-sql3 CityNetConf - sql+c#=u-sql
3 CityNetConf - sql+c#=u-sql
 
Document db
Document dbDocument db
Document db
 
NoSQL on ACID - Meet Unstructured Postgres
NoSQL on ACID - Meet Unstructured PostgresNoSQL on ACID - Meet Unstructured Postgres
NoSQL on ACID - Meet Unstructured Postgres
 
Introduction to azure document db
Introduction to azure document dbIntroduction to azure document db
Introduction to azure document db
 
Azure Cosmos DB: Features, Practical Use and Optimization "
Azure Cosmos DB: Features, Practical Use and Optimization "Azure Cosmos DB: Features, Practical Use and Optimization "
Azure Cosmos DB: Features, Practical Use and Optimization "
 
U-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersU-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for Developers
 

More from botsplash.com

Bootstrap SaaS startup using Open Source Tools
Bootstrap SaaS startup using Open Source ToolsBootstrap SaaS startup using Open Source Tools
Bootstrap SaaS startup using Open Source Tools
botsplash.com
 
Devops Days, 2019 - Charlotte
Devops Days, 2019 - CharlotteDevops Days, 2019 - Charlotte
Devops Days, 2019 - Charlotte
botsplash.com
 
Building NLP solutions for Davidson ML Group
Building NLP solutions for Davidson ML GroupBuilding NLP solutions for Davidson ML Group
Building NLP solutions for Davidson ML Group
botsplash.com
 
Building NLP solutions using Python
Building NLP solutions using PythonBuilding NLP solutions using Python
Building NLP solutions using Python
botsplash.com
 
Chat interfaces, Extension to Digital Marketing
Chat interfaces, Extension to Digital MarketingChat interfaces, Extension to Digital Marketing
Chat interfaces, Extension to Digital Marketing
botsplash.com
 
Cloud computing options
Cloud computing optionsCloud computing options
Cloud computing options
botsplash.com
 
Data Science meets Digital Marketing
Data Science meets Digital MarketingData Science meets Digital Marketing
Data Science meets Digital Marketing
botsplash.com
 
botsplash deep dive
botsplash deep divebotsplash deep dive
botsplash deep dive
botsplash.com
 
Building Twitter bot using Python
Building Twitter bot using PythonBuilding Twitter bot using Python
Building Twitter bot using Python
botsplash.com
 
Python for data science
Python for data sciencePython for data science
Python for data science
botsplash.com
 
Live development & tools
Live development & toolsLive development & tools
Live development & tools
botsplash.com
 
AI Use Cases discussion
AI Use Cases discussionAI Use Cases discussion
AI Use Cases discussion
botsplash.com
 
Career advice for beginner software engineers
Career advice for beginner software engineersCareer advice for beginner software engineers
Career advice for beginner software engineers
botsplash.com
 
Node.js Getting Started &amd Best Practices
Node.js Getting Started &amd Best PracticesNode.js Getting Started &amd Best Practices
Node.js Getting Started &amd Best Practices
botsplash.com
 

More from botsplash.com (14)

Bootstrap SaaS startup using Open Source Tools
Bootstrap SaaS startup using Open Source ToolsBootstrap SaaS startup using Open Source Tools
Bootstrap SaaS startup using Open Source Tools
 
Devops Days, 2019 - Charlotte
Devops Days, 2019 - CharlotteDevops Days, 2019 - Charlotte
Devops Days, 2019 - Charlotte
 
Building NLP solutions for Davidson ML Group
Building NLP solutions for Davidson ML GroupBuilding NLP solutions for Davidson ML Group
Building NLP solutions for Davidson ML Group
 
Building NLP solutions using Python
Building NLP solutions using PythonBuilding NLP solutions using Python
Building NLP solutions using Python
 
Chat interfaces, Extension to Digital Marketing
Chat interfaces, Extension to Digital MarketingChat interfaces, Extension to Digital Marketing
Chat interfaces, Extension to Digital Marketing
 
Cloud computing options
Cloud computing optionsCloud computing options
Cloud computing options
 
Data Science meets Digital Marketing
Data Science meets Digital MarketingData Science meets Digital Marketing
Data Science meets Digital Marketing
 
botsplash deep dive
botsplash deep divebotsplash deep dive
botsplash deep dive
 
Building Twitter bot using Python
Building Twitter bot using PythonBuilding Twitter bot using Python
Building Twitter bot using Python
 
Python for data science
Python for data sciencePython for data science
Python for data science
 
Live development & tools
Live development & toolsLive development & tools
Live development & tools
 
AI Use Cases discussion
AI Use Cases discussionAI Use Cases discussion
AI Use Cases discussion
 
Career advice for beginner software engineers
Career advice for beginner software engineersCareer advice for beginner software engineers
Career advice for beginner software engineers
 
Node.js Getting Started &amd Best Practices
Node.js Getting Started &amd Best PracticesNode.js Getting Started &amd Best Practices
Node.js Getting Started &amd Best Practices
 

Recently uploaded

Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 

Recently uploaded (20)

Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 

Migrating to postgresql

  • 1. Migrating to Postgresql For Charlotte SQL Saturday on 12/07/2019 By Ramu Pulipati
  • 2. Thank You to our Sponsors
  • 3. About Me Cofounder / CTO at Botsplash Software-as-a-service and hosted messaging platform to engage businesses and customers. botsplash.com
  • 4. What is Postgresql? • Free & Open Source RDMS • Alternative to Microsoft SQL Server, MySQL, Oracle, Mongo DB or any RDBMS and NoSQL databases • Battle tested for over 30 years with continuous improvements to support modern applications
  • 6. Why Postgresql? • BSD License • Free for Commercial use • No vendor Lock-in • Predictable releases & fixes • Active Community • Great Performance • Extensibility • Hosted options • Professional Services Source: postgresql.org
  • 7. Differentiators • Strong SQL Types • Rich JSON Support / NoSQL • Native Table Partitioning • Full Text Search • Pubsub • GIS / Spatial Functionality • Scalability & Multi-tenancy • Extensibility 80% Commercial Databases Postgresql
  • 9. Compare with others • Replaces • Mongo Db • SQL Server • MySQL • Oracle • Complements • Redis • Elasticsearch • Clickhouse Source: NoSQL Performance Benchmark 02/27/2018
  • 10. History & What’s new Version Major Feature V12 10/03/2019 JSONB Query & Partition Improvements, Performance V11 10/18/2018 Query Parallelism Improvements Just-in-time compilation V10 10/05/2017 Declarative Table Partitions Logical Replication Improved Monitoring and Control V9.6 09/29/2016 Parallel Query Foreign Data Wrappers Replication V9.5 07/01/2016 JSONB Modifying Operators Row level security UPSERT statement V9.4 12/18/2014 Introduce JSONB Materialized View Improvements Source: Postgresql Releases
  • 11. Getting Started • Download and Install • Postgres 11+ supports Windows 2012 R2 deployment. • Cloud hosting options • Client • pgAdmin • psql command line
  • 12. SQL Support • Case Sensitive Schema Names • Case Sensitive Data Storage • Type casting & Operators • Date Time formatting • Common Table Expressions • Array Data Types • Upserts • Stored Procedures • Multiple languages support
  • 13. Common Data Types Data Type Commonly Used Names Number Smallint, integer, Bigint, decimal, Money Number (auto) Serial, BigSerial Enum Enum data types stored Character Char, nchar, Text Binary Bytea Date Time Timestamp with timezone, Timestamp without Timezone, interval Collections Array, JSON, JSONB Misc Boolean, UUID, Geo Types, Network Address Mac Address, Custom Types Full Text Search TsVector, TsQuery See details from tutorials point
  • 14. Special Data Types • Collections • Arrays • Range Types • Searchable • Indexable • Aggregate functions Credit: Igal Sapir slides
  • 15. JSON Datatypes • Equivalent to embedded MongoDB Credit: postgresql documentation Notable Functions Description ::JSONB Casting || or JSONB_SET or JSONB_BUILD_OBJECT Build or set JSONB values JSONB_AGG & JSONB_BUILD_ARRAY Aggregate functions JSONB_PATH_*, JSONB_EACH, JSONB_EXTRACT Path & Extract Functions JSONB DEMO
  • 16. Advanced Data Types • Pivot Tables crosstab function • Materialized Views • HStore • EXPLAIN ANALYZE • Pg_stat • XML Columns (not much used)
  • 17. Concurrency - MVCC • Postgres uses “Multi-version concurrency control”. • Isolation at “read-committed” level • Row level locks are explicit • Same technique used in Oracle, CouchDB, etc
  • 18. Indexes • Index Support • Single Column / Exact Matches • Multi Column • Unique • Partial Indexes • Expression Indexes • Implicit Indexes (PK, UK) Credit: Igal Sapir slides
  • 19. Disadvantages / Limits • Database only solution • Few available tools compared to commercial • Limited Talent Pool Source: https://www.youtube.com/watch?v=6p2TNPabt6M Source: Postgres limits from sreenstepslive.com
  • 20. Best Practices • Performance Optimization • Do not read from Database at all • Use indexes efficiently • Use pg_stats collector to monitor usage and performance • Vacuum regularly to clean up storage • Bench mark hardware and optimize pg parameters • Always use SSL for connectivity in untrusted networks
  • 21. Reasons to Fill Out Session Evaluations Helps Speakers Helps Organizers Helps You!
  • 22. References and Follow up • Postgresql Documentatoin • Igal Sapir Postgresql Presentation • Introduction to Postgresql slideshare • The Internals of Postgresql • Postgresql excercises • MVCC: postgres internals or interdb Questions? Contact me at ramu@botsplash.com