SlideShare a Scribd company logo
1 of 59
Download to read offline
PostgreSQL 9.4, 9.5 and
Beyond
JSON, Analytics, and More
Uptime Technologies
Satoshi Nagayasu
@snaga
COSCUP 2015
Who I Am
• Satoshi Nagayasu
– Database enthusiast. DBA and Data Steward.
– Traveling in Asia: Hong Kong, Shenzhen, Beijing, Singapore,
Taipei
• Uptime Technologies
– Co-founder
– Consulting services around Database and Platform
Technologies.
• PostgreSQL
– pgstatindex, pageinspect, xlogdump
– PostgresForest, Postgres-XC (cluster technology)
– Organizing Japanese Users Group.
Thanks to...
• Magnus Hagander
• Michael Paquier
• Toshi Harada
• Noriyoshi Shinoda
• ... and many pg guys!
Agenda
• 9.4 & 9.5 Overview
• NoSQL (JSON and GIN Index)
• Analytics (Aggregation, Mat.View & BRIN)
• SQL (UPSERT)
• Security (Row Level Security)
• Replication and Beyond (Logical Decoding)
• Administration (ALTER SYSTEM)
• Infrastructure (For Parallelization)
• Beyond 9.5
9.4 & 9.5 Overview
9.4 Status
• The first official release.
– 9.4 released on December 18th, 2014.
• The latest stable release
– 9.4.4 released on June 12th, 2015.
9.5 Status
• Current Status
– 9.5 Alpha 2 released on August 5th, 2015
• The first Beta (or another Alpha) will be
coming in September.
• The final release will be coming on late
this year.
http://www.postgresql.org/about/news/1604/
Statistics
• 9.4.4 - compared to 9.3.9
– 3,910 files changed.
– 51,724 insertions (+) in *.c, *.h files
– 16,387 deletions (-)
• 9.5alpha2 - compared to 9.4.4
– 4,246 files changed.
– 91,138 insertions (+)
– 22,393 deletions (-)
9.4 Overview - Changes
Lots of changes!!
Categories of Enhancements
• NoSQL (JSON and GIN Index)
• Analytics (Aggregation, Mat.View & BRIN)
• SQL (UPSERT)
• Security (Row Level Security)
• Replication+ (Logical Decoding)
• Administration (ALTER SYSTEM)
• Basic Infrastructure (Parallelization)
NoSQL
(JSON and GIN Index)
NoSQL - JSONB
• JSON (9.3) vs. JSONB (9.4)
NoSQL - JSONB
• “Binary JSON”
– Different from JSON, a text representation
– Faster for searching
• With JSONB...
– No duplicated keys allowed. Last wins.
– Key order not preserved.
– Can take advantages of GIN Index.
NoSQL - JSONB
Operator Description
9.4
-> Get an element by key as a JSON object
->> Get an element by key as a text object
#> Get an element by path as a JSON object
#>> Get an element by path as a text object
<@, @> Evaluate whether a JSON object contains a key/value pair
? Evaluate whether a JSON object contains a key or a value
?| Evaluate whether a JSON object contains ANY of keys or values
?& Evaluate whether a JSON object contains ALL of keys or values
9.5
|| Insert or Update an element to a JSON object
- Delete an element by key from a JSON object
#- Delete an element by path from a JSON object
http://www.postgresql.org/docs/9.5/static/functions-json.html
NoSQL - GIN Index
• JSON+btree vs. JSONB+GIN
– Btree indexes vs. GIN index
http://www.slideshare.net/toshiharada/jpug-studyjsonbdatatype20141011-40103981
Table Index Size Comparison
Analytics
(Aggregation & Materialized View)
Analytics - Aggregation
• FILTER replaces CASE WHEN.
Analytics - Aggregation
• New Aggregate Functions (New in 9.4)
– percentile_cont()
– percentile_disc()
– mode()
– rank()
– dense_rank()
– percent_rank()
– cume_dist()
Analytics - Aggregation
• Ordered-set aggregates
– mode(), most common value in a subset
Analytics - Aggregation
• Ordered-set aggregates
– rank(), rank of a value in a subset
Analytics - Aggregation
• New in 9.5
–ROLLUP()
–CUBE()
–GROUPING SETS()
Analytics - ROLLUP
• Calculates total/subtotal values
Analytics - CUBE
• Calculates for all combinations of the
specified columns
Analytics – GROUPING SETS
• Runs multiple GROUP BY queries at once
Two GROUP BYs
at once.
Analytics – Materialized
Views
• REFRESH MATERIALIZED VIEW
CONCURRENTLY myview
• Refreshing a MV concurrently (in
background) without exclusive lock.
• Usability and availability improved.
Analytics - BRIN Index
• Block Range INdex (New in 9.5)
– Holds "summary“ data, instead of raw data.
– Reduces index size tremendously.
– Also reduces creation/maintenance cost.
– Needs extra tuple fetch to get the exact record.
0
50,000
100,000
150,000
200,000
250,000
300,000
Btree BRIN
Elapsed time (ms)
Index Creation
0
50,000
100,000
150,000
200,000
250,000
300,000
Btree BRIN
Number of Blocks
Index Size
0
2
4
6
8
10
12
14
16
18
Btree BRIN
Elapsed time (ms)
Select 1 record
https://gist.github.com/snaga/82173bd49749ccf0fa6c
Analytics - BRIN Index
• Structure of BRIN Index
Table File
Block Range 1 (128 Blocks)
Block Range 2
Block Range 3
Block
Range
Min. Value Max. Value
1 1992-01-02 1992-01-28
2 1992-01-27 1992-02-08
3 1992-02-08 1992-02-16
… … …
Holds min/max values
for “Block Ranges”,
128 blocks each
(by default).
(in case a date
column)
Analytics - TABLESAMPLE
• Allows user to specify random BERNOULLI
sampling or block level SYSTEM sampling
– Would improve SELECT query performance
• Need to specify
– Sampling method (SYSTEM | BERNOULLI)
– Fraction of the table (in a percentage)
• Limitation
– Currently accepts only on regular tables and materialized
views
http://www.postgresql.org/docs/9.5/static/sql-select.html
Analytics - TABLESAMPLE
• Calculating the average of total price.
– With/without TABLESAMPLE
Analytics - TABLESAMPLE
Without TABLESAMPLE
Cost: 44076
With SYSTEM Sampl.
Cost: 1199
With BERNOULLI Sampl.
Cost: 25513
UPSERT
INSERT, or UPDATE?
• “duplicate key violation” is one of the
bothersome things in database programming
INSERT … ON CONFLICT …
• Now, you can INSERT or UPDATE in one
statement with “ON CONFLICT”.
INSERT … ON CONFLICT …
INSERT INTO nation VALUES (
12, ‐‐ n_nationkey
'JAPAN', ‐‐ n_name
2, ‐‐ n_regionkey
'Japan (Japanese: 日本 … in East Asia.' ‐‐ n_comment
)
ON CONFLICT (n_nationkey)
DO UPDATE SET n_comment = EXCLUDED.n_comment;
http://www.postgresql.org/docs/9.5/static/sql-insert.html
• This query updates n_comment column when
INSERT conflicts on n_nationkey column.
Row Level Security
Row Level Security
• Row Level Security (RLS)
– Allows users to define access policy to
determine which rows in the table should be
returned.
– Disabled by default.
– CREATE POLICY, ALTER POLICY, DROP
POLICY
• Limitation
– Not applicable to the system catalog
http://www.postgresql.org/docs/9.5/static/ddl-rowsecurity.html
Row Level Security
• Multiple rows (user records) in the table.
Define a policy to filter
out with user name
Row Level Security
• Each user can see only own record.
“user01” can see only
“user01” record
“user02” can see only
“user02” record
Replication and Beyond
(Logical Decoding)
Replication and Beyond –
Logical Decoding
• “Logical” representation from replication stream
– INSERT/UPDATE/DELETE operations
– Can be replayed on different version/platform
• pg_recvlogical command
– Shows how it works
• Replication can be more flexible
– BDR (Bi-Directional Rep.), Slony, and more ...
– Continuous Backup as well
pg_recvlogical
Administration
(ALTER SYSTEM)
Administration - ALTER
SYSTEM
• ALTER SYSTEM SET
– puts new value in postgresql.auto.conf
– pg_reload_conf() reloads them.
– postgresql.auto.conf takes priority over
postgresql.conf.
• ALTER SYSTEM RESET
– Remove values from postgresql.auto.conf.
Infrastructure
(For Parallelization)
Dynamic Background
Workers
• In 9.3, background workers must start at the
postmaster (listener process) startup.
• After 9.4, they can be launched “on-demand”
basis.
• From parallelization point of view...
– It allows to launch multiple background
processes to execute child queries in parallel.
Dynamic Shared Memory
• Shared memory can be allocated “on-demand”
basis
– Cf.) by background workers
• Main segment (ex. shared_buffers) still fixed at
startup
• Also supports lightweight message queue
• From parallelization point of view...
– It allows to share data and communicate with
several bgworker processes.
My Tiny Favorite
(pl/pgsql stacktrace)
pl/pgsql stacktrace
http://h50146.www5.hp.com/services/ci/opensource/pdfs/PostgreSQL_9_4%20_Ver_1_0.pdf
There are many other
enhancements,
so please try it asap.
Beyond 9.5
Commitfest 2015-7~
CommitFest is a process to review, fix and commit
the submitted patches.
• Parallel Seq scan
• Waits monitoring
• Support multiple synchronous standby servers
• and others..
Still work in progress...
commitfest.postgresql.org
Wrap-up
• One of the most developer-friendly
RDBMSes in the world.
• Analytics features and the performance
are improving.
• Things are going to parallel.
Resources
• www.postgresql.org
• www.planetpostgresql.org
• www.pgcon.org
• wiki.postgresql.org
• www.postgresql.org/docs/9.5
• news.ycombinator.com/item?id=10039527
Postgres Toolkit
• A script collection to manage PostgreSQL
– Helps DBA to perform complicated tasks
– Consists of 13 scripts as of v0.2.2.
• A "Victorinox" for PostgreSQL DBA
• uptime.jp/go/pt
SQL Firewall for Postgres
SQL Injection prevented!
pgDay Asia 2016
• As A Joint Event with FOSSASIA 2016
– 1 Day, 2 Tracks (not fixed yet)
• FOSSASIA 2016
– March 18h-20th in Singapore
• Still “Work In Progress”, but mark your
calendar NOW!
Photo by Michael Cannon https://flic.kr/p/rieAXe
Any Question?
• E-mail: snaga@uptime.jp
• Twitter, Github: @snaga
• WeChat: satoshinagayasu
Thank You!

More Related Content

What's hot

Building a Complex, Real-Time Data Management Application
Building a Complex, Real-Time Data Management ApplicationBuilding a Complex, Real-Time Data Management Application
Building a Complex, Real-Time Data Management ApplicationJonathan Katz
 
Major features postgres 11
Major features postgres 11Major features postgres 11
Major features postgres 11EDB
 
Spark performance tuning eng
Spark performance tuning engSpark performance tuning eng
Spark performance tuning enghaiteam
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomyDongmin Yu
 
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph DatabaseBringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph DatabaseJimmy Angelakos
 
Exadata下的数据并行加载、并行卸载及性能监控
Exadata下的数据并行加载、并行卸载及性能监控Exadata下的数据并行加载、并行卸载及性能监控
Exadata下的数据并行加载、并行卸载及性能监控Kaiyao Huang
 
Building Spark as Service in Cloud
Building Spark as Service in CloudBuilding Spark as Service in Cloud
Building Spark as Service in CloudInMobi Technology
 
Presto updates to 0.178
Presto updates to 0.178Presto updates to 0.178
Presto updates to 0.178Kai Sasaki
 
Big Data and PostgreSQL
Big Data and PostgreSQLBig Data and PostgreSQL
Big Data and PostgreSQLPGConf APAC
 
PostgreSQL and Redis - talk at pgcon 2013
PostgreSQL and Redis - talk at pgcon 2013PostgreSQL and Redis - talk at pgcon 2013
PostgreSQL and Redis - talk at pgcon 2013Andrew Dunstan
 
Expand data analysis tool at scale with Zeppelin
Expand data analysis tool at scale with ZeppelinExpand data analysis tool at scale with Zeppelin
Expand data analysis tool at scale with ZeppelinDataWorks Summit
 
SQL for Elasticsearch
SQL for ElasticsearchSQL for Elasticsearch
SQL for ElasticsearchJodok Batlogg
 
Toro DB- Open-source, MongoDB-compatible database, built on top of PostgreSQL
Toro DB- Open-source, MongoDB-compatible database,  built on top of PostgreSQLToro DB- Open-source, MongoDB-compatible database,  built on top of PostgreSQL
Toro DB- Open-source, MongoDB-compatible database, built on top of PostgreSQLInMobi Technology
 
Operating PostgreSQL at Scale with Kubernetes
Operating PostgreSQL at Scale with KubernetesOperating PostgreSQL at Scale with Kubernetes
Operating PostgreSQL at Scale with KubernetesJonathan Katz
 
Why you should care about data layout in the file system with Cheng Lian and ...
Why you should care about data layout in the file system with Cheng Lian and ...Why you should care about data layout in the file system with Cheng Lian and ...
Why you should care about data layout in the file system with Cheng Lian and ...Databricks
 
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)Matt Fuller
 
PostgreSQL Write-Ahead Log (Heikki Linnakangas)
PostgreSQL Write-Ahead Log (Heikki Linnakangas) PostgreSQL Write-Ahead Log (Heikki Linnakangas)
PostgreSQL Write-Ahead Log (Heikki Linnakangas) Ontico
 
Debugging & Tuning in Spark
Debugging & Tuning in SparkDebugging & Tuning in Spark
Debugging & Tuning in SparkShiao-An Yuan
 
Better Full Text Search in PostgreSQL
Better Full Text Search in PostgreSQLBetter Full Text Search in PostgreSQL
Better Full Text Search in PostgreSQLArtur Zakirov
 

What's hot (20)

Building a Complex, Real-Time Data Management Application
Building a Complex, Real-Time Data Management ApplicationBuilding a Complex, Real-Time Data Management Application
Building a Complex, Real-Time Data Management Application
 
Major features postgres 11
Major features postgres 11Major features postgres 11
Major features postgres 11
 
Spark performance tuning eng
Spark performance tuning engSpark performance tuning eng
Spark performance tuning eng
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomy
 
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph DatabaseBringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
 
Exadata下的数据并行加载、并行卸载及性能监控
Exadata下的数据并行加载、并行卸载及性能监控Exadata下的数据并行加载、并行卸载及性能监控
Exadata下的数据并行加载、并行卸载及性能监控
 
Building Spark as Service in Cloud
Building Spark as Service in CloudBuilding Spark as Service in Cloud
Building Spark as Service in Cloud
 
Presto updates to 0.178
Presto updates to 0.178Presto updates to 0.178
Presto updates to 0.178
 
Big Data and PostgreSQL
Big Data and PostgreSQLBig Data and PostgreSQL
Big Data and PostgreSQL
 
PostgreSQL and Redis - talk at pgcon 2013
PostgreSQL and Redis - talk at pgcon 2013PostgreSQL and Redis - talk at pgcon 2013
PostgreSQL and Redis - talk at pgcon 2013
 
Expand data analysis tool at scale with Zeppelin
Expand data analysis tool at scale with ZeppelinExpand data analysis tool at scale with Zeppelin
Expand data analysis tool at scale with Zeppelin
 
Case Studies on PostgreSQL
Case Studies on PostgreSQLCase Studies on PostgreSQL
Case Studies on PostgreSQL
 
SQL for Elasticsearch
SQL for ElasticsearchSQL for Elasticsearch
SQL for Elasticsearch
 
Toro DB- Open-source, MongoDB-compatible database, built on top of PostgreSQL
Toro DB- Open-source, MongoDB-compatible database,  built on top of PostgreSQLToro DB- Open-source, MongoDB-compatible database,  built on top of PostgreSQL
Toro DB- Open-source, MongoDB-compatible database, built on top of PostgreSQL
 
Operating PostgreSQL at Scale with Kubernetes
Operating PostgreSQL at Scale with KubernetesOperating PostgreSQL at Scale with Kubernetes
Operating PostgreSQL at Scale with Kubernetes
 
Why you should care about data layout in the file system with Cheng Lian and ...
Why you should care about data layout in the file system with Cheng Lian and ...Why you should care about data layout in the file system with Cheng Lian and ...
Why you should care about data layout in the file system with Cheng Lian and ...
 
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
 
PostgreSQL Write-Ahead Log (Heikki Linnakangas)
PostgreSQL Write-Ahead Log (Heikki Linnakangas) PostgreSQL Write-Ahead Log (Heikki Linnakangas)
PostgreSQL Write-Ahead Log (Heikki Linnakangas)
 
Debugging & Tuning in Spark
Debugging & Tuning in SparkDebugging & Tuning in Spark
Debugging & Tuning in Spark
 
Better Full Text Search in PostgreSQL
Better Full Text Search in PostgreSQLBetter Full Text Search in PostgreSQL
Better Full Text Search in PostgreSQL
 

Viewers also liked

PostgreSQL Community in Japan
PostgreSQL Community in JapanPostgreSQL Community in Japan
PostgreSQL Community in JapanSatoshi Nagayasu
 
海外の技術カンファレンスに行こう! Let’s go tech conferences overseas!
海外の技術カンファレンスに行こう! Let’s go tech conferences overseas!海外の技術カンファレンスに行こう! Let’s go tech conferences overseas!
海外の技術カンファレンスに行こう! Let’s go tech conferences overseas!Satoshi Nagayasu
 
In-Database Analyticsの必要性と可能性
In-Database Analyticsの必要性と可能性In-Database Analyticsの必要性と可能性
In-Database Analyticsの必要性と可能性Satoshi Nagayasu
 
遊休リソースを用いた 相同性検索処理の並列化とその評価
遊休リソースを用いた相同性検索処理の並列化とその評価遊休リソースを用いた相同性検索処理の並列化とその評価
遊休リソースを用いた 相同性検索処理の並列化とその評価Satoshi Nagayasu
 
映画「マネーボール」に学ぶデータ分析と組織行動論
映画「マネーボール」に学ぶデータ分析と組織行動論映画「マネーボール」に学ぶデータ分析と組織行動論
映画「マネーボール」に学ぶデータ分析と組織行動論Satoshi Nagayasu
 
統計勉強会 分割表とカイ二乗検定
統計勉強会 分割表とカイ二乗検定統計勉強会 分割表とカイ二乗検定
統計勉強会 分割表とカイ二乗検定Satoshi Nagayasu
 
A Story Behind the Conference, or How pgDay Asia was born
A Story Behind the Conference, or How pgDay Asia was bornA Story Behind the Conference, or How pgDay Asia was born
A Story Behind the Conference, or How pgDay Asia was bornSatoshi Nagayasu
 
データベースエンジニアがデータヘルスの2年間で見たもの(仮)
データベースエンジニアがデータヘルスの2年間で見たもの(仮)データベースエンジニアがデータヘルスの2年間で見たもの(仮)
データベースエンジニアがデータヘルスの2年間で見たもの(仮)Satoshi Nagayasu
 
Jpug study-jsonb-datatype-20141011
Jpug study-jsonb-datatype-20141011Jpug study-jsonb-datatype-20141011
Jpug study-jsonb-datatype-20141011Toshi Harada
 
PostgreSQL 9.4 and Beyond @ FOSSASIA 2015 Singapore
PostgreSQL 9.4 and Beyond @ FOSSASIA 2015 SingaporePostgreSQL 9.4 and Beyond @ FOSSASIA 2015 Singapore
PostgreSQL 9.4 and Beyond @ FOSSASIA 2015 SingaporeSatoshi Nagayasu
 
PL/Pythonで独自の集約関数を作ってみる
PL/Pythonで独自の集約関数を作ってみるPL/Pythonで独自の集約関数を作ってみる
PL/Pythonで独自の集約関数を作ってみるUptime Technologies LLC (JP)
 
TensorFlow を使った 機械学習ことはじめ (GDG京都 機械学習勉強会)
TensorFlow を使った機械学習ことはじめ (GDG京都 機械学習勉強会)TensorFlow を使った機械学習ことはじめ (GDG京都 機械学習勉強会)
TensorFlow を使った 機械学習ことはじめ (GDG京都 機械学習勉強会)徹 上野山
 

Viewers also liked (20)

PostgreSQL Community in Japan
PostgreSQL Community in JapanPostgreSQL Community in Japan
PostgreSQL Community in Japan
 
海外の技術カンファレンスに行こう! Let’s go tech conferences overseas!
海外の技術カンファレンスに行こう! Let’s go tech conferences overseas!海外の技術カンファレンスに行こう! Let’s go tech conferences overseas!
海外の技術カンファレンスに行こう! Let’s go tech conferences overseas!
 
PostgreSQL 9.4
PostgreSQL 9.4PostgreSQL 9.4
PostgreSQL 9.4
 
[WIP] pgDay Asia 2016
[WIP] pgDay Asia 2016[WIP] pgDay Asia 2016
[WIP] pgDay Asia 2016
 
In-Database Analyticsの必要性と可能性
In-Database Analyticsの必要性と可能性In-Database Analyticsの必要性と可能性
In-Database Analyticsの必要性と可能性
 
20040228 Hokkaido 1
20040228 Hokkaido 120040228 Hokkaido 1
20040228 Hokkaido 1
 
遊休リソースを用いた 相同性検索処理の並列化とその評価
遊休リソースを用いた相同性検索処理の並列化とその評価遊休リソースを用いた相同性検索処理の並列化とその評価
遊休リソースを用いた 相同性検索処理の並列化とその評価
 
映画「マネーボール」に学ぶデータ分析と組織行動論
映画「マネーボール」に学ぶデータ分析と組織行動論映画「マネーボール」に学ぶデータ分析と組織行動論
映画「マネーボール」に学ぶデータ分析と組織行動論
 
統計勉強会 分割表とカイ二乗検定
統計勉強会 分割表とカイ二乗検定統計勉強会 分割表とカイ二乗検定
統計勉強会 分割表とカイ二乗検定
 
A Story Behind the Conference, or How pgDay Asia was born
A Story Behind the Conference, or How pgDay Asia was bornA Story Behind the Conference, or How pgDay Asia was born
A Story Behind the Conference, or How pgDay Asia was born
 
データベースエンジニアがデータヘルスの2年間で見たもの(仮)
データベースエンジニアがデータヘルスの2年間で見たもの(仮)データベースエンジニアがデータヘルスの2年間で見たもの(仮)
データベースエンジニアがデータヘルスの2年間で見たもの(仮)
 
Jpug study-jsonb-datatype-20141011
Jpug study-jsonb-datatype-20141011Jpug study-jsonb-datatype-20141011
Jpug study-jsonb-datatype-20141011
 
PostgreSQL 9.4 and Beyond @ FOSSASIA 2015 Singapore
PostgreSQL 9.4 and Beyond @ FOSSASIA 2015 SingaporePostgreSQL 9.4 and Beyond @ FOSSASIA 2015 Singapore
PostgreSQL 9.4 and Beyond @ FOSSASIA 2015 Singapore
 
PostgreSQL安定運用のコツ2009 @hbstudy#5
PostgreSQL安定運用のコツ2009 @hbstudy#5PostgreSQL安定運用のコツ2009 @hbstudy#5
PostgreSQL安定運用のコツ2009 @hbstudy#5
 
PL/Pythonで独自の集約関数を作ってみる
PL/Pythonで独自の集約関数を作ってみるPL/Pythonで独自の集約関数を作ってみる
PL/Pythonで独自の集約関数を作ってみる
 
NTT DATA と PostgreSQL が挑んだ総力戦
NTT DATA と PostgreSQL が挑んだ総力戦NTT DATA と PostgreSQL が挑んだ総力戦
NTT DATA と PostgreSQL が挑んだ総力戦
 
pgDay Asia 2016 & 2017
pgDay Asia 2016 & 2017pgDay Asia 2016 & 2017
pgDay Asia 2016 & 2017
 
PostgreSQLの運用・監視にまつわるエトセトラ
PostgreSQLの運用・監視にまつわるエトセトラPostgreSQLの運用・監視にまつわるエトセトラ
PostgreSQLの運用・監視にまつわるエトセトラ
 
PostgreSQLセキュリティ総復習
PostgreSQLセキュリティ総復習PostgreSQLセキュリティ総復習
PostgreSQLセキュリティ総復習
 
TensorFlow を使った 機械学習ことはじめ (GDG京都 機械学習勉強会)
TensorFlow を使った機械学習ことはじめ (GDG京都 機械学習勉強会)TensorFlow を使った機械学習ことはじめ (GDG京都 機械学習勉強会)
TensorFlow を使った 機械学習ことはじめ (GDG京都 機械学習勉強会)
 

Similar to PostgreSQL 9.4, 9.5 and Beyond @ COSCUP 2015 Taipei

The life of a query (oracle edition)
The life of a query (oracle edition)The life of a query (oracle edition)
The life of a query (oracle edition)maclean liu
 
ElasticSearch as (only) datastore
ElasticSearch as (only) datastoreElasticSearch as (only) datastore
ElasticSearch as (only) datastoreTomas Sirny
 
Hadoop Summit 2014: Query Optimization and JIT-based Vectorized Execution in ...
Hadoop Summit 2014: Query Optimization and JIT-based Vectorized Execution in ...Hadoop Summit 2014: Query Optimization and JIT-based Vectorized Execution in ...
Hadoop Summit 2014: Query Optimization and JIT-based Vectorized Execution in ...Gruter
 
Apache Tajo: Query Optimization Techniques and JIT-based Vectorized Engine
Apache Tajo: Query Optimization Techniques and JIT-based Vectorized EngineApache Tajo: Query Optimization Techniques and JIT-based Vectorized Engine
Apache Tajo: Query Optimization Techniques and JIT-based Vectorized EngineDataWorks Summit
 
Apache Lucene/Solr Document Classification
Apache Lucene/Solr Document ClassificationApache Lucene/Solr Document Classification
Apache Lucene/Solr Document ClassificationSease
 
Lucene And Solr Document Classification
Lucene And Solr Document ClassificationLucene And Solr Document Classification
Lucene And Solr Document ClassificationAlessandro Benedetti
 
What's New in Postgres 9.4
What's New in Postgres 9.4What's New in Postgres 9.4
What's New in Postgres 9.4EDB
 
Skillwise - Enhancing dotnet app
Skillwise - Enhancing dotnet appSkillwise - Enhancing dotnet app
Skillwise - Enhancing dotnet appSkillwise Group
 
What you need to know for postgresql operation
What you need to know for postgresql operationWhat you need to know for postgresql operation
What you need to know for postgresql operationAnton Bushmelev
 
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...Ontico
 
The Art of Database Experiments – PostgresConf Silicon Valley 2018 / San Jose
The Art of Database Experiments – PostgresConf Silicon Valley 2018 / San JoseThe Art of Database Experiments – PostgresConf Silicon Valley 2018 / San Jose
The Art of Database Experiments – PostgresConf Silicon Valley 2018 / San JoseNikolay Samokhvalov
 
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 2014Kate Marshalkina
 
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...ronwarshawsky
 
Типы данных JSONb, соответствующие индексы и модуль jsquery – Олег Бартунов, ...
Типы данных JSONb, соответствующие индексы и модуль jsquery – Олег Бартунов, ...Типы данных JSONb, соответствующие индексы и модуль jsquery – Олег Бартунов, ...
Типы данных JSONb, соответствующие индексы и модуль jsquery – Олег Бартунов, ...Yandex
 
PostgreSQL Moscow Meetup - September 2014 - Oleg Bartunov and Alexander Korotkov
PostgreSQL Moscow Meetup - September 2014 - Oleg Bartunov and Alexander KorotkovPostgreSQL Moscow Meetup - September 2014 - Oleg Bartunov and Alexander Korotkov
PostgreSQL Moscow Meetup - September 2014 - Oleg Bartunov and Alexander KorotkovNikolay Samokhvalov
 
PostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQLPostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQLAlexei Krasner
 
Hyperspace: An Indexing Subsystem for Apache Spark
Hyperspace: An Indexing Subsystem for Apache SparkHyperspace: An Indexing Subsystem for Apache Spark
Hyperspace: An Indexing Subsystem for Apache SparkDatabricks
 
AvalancheProject2012
AvalancheProject2012AvalancheProject2012
AvalancheProject2012fishetra
 
2015-12-05 Александр Коротков, Иван Панченко - Слабо-структурированные данные...
2015-12-05 Александр Коротков, Иван Панченко - Слабо-структурированные данные...2015-12-05 Александр Коротков, Иван Панченко - Слабо-структурированные данные...
2015-12-05 Александр Коротков, Иван Панченко - Слабо-структурированные данные...HappyDev
 

Similar to PostgreSQL 9.4, 9.5 and Beyond @ COSCUP 2015 Taipei (20)

The life of a query (oracle edition)
The life of a query (oracle edition)The life of a query (oracle edition)
The life of a query (oracle edition)
 
ElasticSearch as (only) datastore
ElasticSearch as (only) datastoreElasticSearch as (only) datastore
ElasticSearch as (only) datastore
 
Hadoop Summit 2014: Query Optimization and JIT-based Vectorized Execution in ...
Hadoop Summit 2014: Query Optimization and JIT-based Vectorized Execution in ...Hadoop Summit 2014: Query Optimization and JIT-based Vectorized Execution in ...
Hadoop Summit 2014: Query Optimization and JIT-based Vectorized Execution in ...
 
Apache Tajo: Query Optimization Techniques and JIT-based Vectorized Engine
Apache Tajo: Query Optimization Techniques and JIT-based Vectorized EngineApache Tajo: Query Optimization Techniques and JIT-based Vectorized Engine
Apache Tajo: Query Optimization Techniques and JIT-based Vectorized Engine
 
Apache Lucene/Solr Document Classification
Apache Lucene/Solr Document ClassificationApache Lucene/Solr Document Classification
Apache Lucene/Solr Document Classification
 
Lucene And Solr Document Classification
Lucene And Solr Document ClassificationLucene And Solr Document Classification
Lucene And Solr Document Classification
 
What's New in Postgres 9.4
What's New in Postgres 9.4What's New in Postgres 9.4
What's New in Postgres 9.4
 
Skillwise - Enhancing dotnet app
Skillwise - Enhancing dotnet appSkillwise - Enhancing dotnet app
Skillwise - Enhancing dotnet app
 
Internals of Presto Service
Internals of Presto ServiceInternals of Presto Service
Internals of Presto Service
 
What you need to know for postgresql operation
What you need to know for postgresql operationWhat you need to know for postgresql operation
What you need to know for postgresql operation
 
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...
 
The Art of Database Experiments – PostgresConf Silicon Valley 2018 / San Jose
The Art of Database Experiments – PostgresConf Silicon Valley 2018 / San JoseThe Art of Database Experiments – PostgresConf Silicon Valley 2018 / San Jose
The Art of Database Experiments – PostgresConf Silicon Valley 2018 / San Jose
 
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
 
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
 
Типы данных JSONb, соответствующие индексы и модуль jsquery – Олег Бартунов, ...
Типы данных JSONb, соответствующие индексы и модуль jsquery – Олег Бартунов, ...Типы данных JSONb, соответствующие индексы и модуль jsquery – Олег Бартунов, ...
Типы данных JSONb, соответствующие индексы и модуль jsquery – Олег Бартунов, ...
 
PostgreSQL Moscow Meetup - September 2014 - Oleg Bartunov and Alexander Korotkov
PostgreSQL Moscow Meetup - September 2014 - Oleg Bartunov and Alexander KorotkovPostgreSQL Moscow Meetup - September 2014 - Oleg Bartunov and Alexander Korotkov
PostgreSQL Moscow Meetup - September 2014 - Oleg Bartunov and Alexander Korotkov
 
PostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQLPostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQL
 
Hyperspace: An Indexing Subsystem for Apache Spark
Hyperspace: An Indexing Subsystem for Apache SparkHyperspace: An Indexing Subsystem for Apache Spark
Hyperspace: An Indexing Subsystem for Apache Spark
 
AvalancheProject2012
AvalancheProject2012AvalancheProject2012
AvalancheProject2012
 
2015-12-05 Александр Коротков, Иван Панченко - Слабо-структурированные данные...
2015-12-05 Александр Коротков, Иван Панченко - Слабо-структурированные данные...2015-12-05 Александр Коротков, Иван Панченко - Слабо-структурированные данные...
2015-12-05 Александр Коротков, Иван Панченко - Слабо-структурированные данные...
 

More from Satoshi Nagayasu

データウェアハウスモデリング入門(ダイジェスト版)(事前公開版)
データウェアハウスモデリング入門(ダイジェスト版)(事前公開版) データウェアハウスモデリング入門(ダイジェスト版)(事前公開版)
データウェアハウスモデリング入門(ダイジェスト版)(事前公開版) Satoshi Nagayasu
 
Oracle対応アプリケーションのDockerize事始め
Oracle対応アプリケーションのDockerize事始めOracle対応アプリケーションのDockerize事始め
Oracle対応アプリケーションのDockerize事始めSatoshi Nagayasu
 
アナリティクスをPostgreSQLで始めるべき10の理由@第6回 関西DB勉強会
アナリティクスをPostgreSQLで始めるべき10の理由@第6回 関西DB勉強会アナリティクスをPostgreSQLで始めるべき10の理由@第6回 関西DB勉強会
アナリティクスをPostgreSQLで始めるべき10の理由@第6回 関西DB勉強会Satoshi Nagayasu
 
Django/Celeyを用いたデータ分析Webアプリケーションにおける非同期処理の設計と実装
Django/Celeyを用いたデータ分析Webアプリケーションにおける非同期処理の設計と実装Django/Celeyを用いたデータ分析Webアプリケーションにおける非同期処理の設計と実装
Django/Celeyを用いたデータ分析Webアプリケーションにおける非同期処理の設計と実装Satoshi Nagayasu
 
PostgreSQL Internals - Buffer Management
PostgreSQL Internals - Buffer ManagementPostgreSQL Internals - Buffer Management
PostgreSQL Internals - Buffer ManagementSatoshi Nagayasu
 
PostgreSQL - C言語によるユーザ定義関数の作り方
PostgreSQL - C言語によるユーザ定義関数の作り方PostgreSQL - C言語によるユーザ定義関数の作り方
PostgreSQL - C言語によるユーザ定義関数の作り方Satoshi Nagayasu
 

More from Satoshi Nagayasu (8)

データウェアハウスモデリング入門(ダイジェスト版)(事前公開版)
データウェアハウスモデリング入門(ダイジェスト版)(事前公開版) データウェアハウスモデリング入門(ダイジェスト版)(事前公開版)
データウェアハウスモデリング入門(ダイジェスト版)(事前公開版)
 
Oracle対応アプリケーションのDockerize事始め
Oracle対応アプリケーションのDockerize事始めOracle対応アプリケーションのDockerize事始め
Oracle対応アプリケーションのDockerize事始め
 
アナリティクスをPostgreSQLで始めるべき10の理由@第6回 関西DB勉強会
アナリティクスをPostgreSQLで始めるべき10の理由@第6回 関西DB勉強会アナリティクスをPostgreSQLで始めるべき10の理由@第6回 関西DB勉強会
アナリティクスをPostgreSQLで始めるべき10の理由@第6回 関西DB勉強会
 
Django/Celeyを用いたデータ分析Webアプリケーションにおける非同期処理の設計と実装
Django/Celeyを用いたデータ分析Webアプリケーションにおける非同期処理の設計と実装Django/Celeyを用いたデータ分析Webアプリケーションにおける非同期処理の設計と実装
Django/Celeyを用いたデータ分析Webアプリケーションにおける非同期処理の設計と実装
 
PgAccelerator
PgAcceleratorPgAccelerator
PgAccelerator
 
PostgreSQL Internals - Buffer Management
PostgreSQL Internals - Buffer ManagementPostgreSQL Internals - Buffer Management
PostgreSQL Internals - Buffer Management
 
PostgreSQL - C言語によるユーザ定義関数の作り方
PostgreSQL - C言語によるユーザ定義関数の作り方PostgreSQL - C言語によるユーザ定義関数の作り方
PostgreSQL - C言語によるユーザ定義関数の作り方
 
PostgreSQL What's Next
PostgreSQL What's NextPostgreSQL What's Next
PostgreSQL What's Next
 

Recently uploaded

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile EnvironmentVictorSzoltysek
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 

Recently uploaded (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 

PostgreSQL 9.4, 9.5 and Beyond @ COSCUP 2015 Taipei

  • 1. PostgreSQL 9.4, 9.5 and Beyond JSON, Analytics, and More Uptime Technologies Satoshi Nagayasu @snaga COSCUP 2015
  • 2. Who I Am • Satoshi Nagayasu – Database enthusiast. DBA and Data Steward. – Traveling in Asia: Hong Kong, Shenzhen, Beijing, Singapore, Taipei • Uptime Technologies – Co-founder – Consulting services around Database and Platform Technologies. • PostgreSQL – pgstatindex, pageinspect, xlogdump – PostgresForest, Postgres-XC (cluster technology) – Organizing Japanese Users Group.
  • 3. Thanks to... • Magnus Hagander • Michael Paquier • Toshi Harada • Noriyoshi Shinoda • ... and many pg guys!
  • 4. Agenda • 9.4 & 9.5 Overview • NoSQL (JSON and GIN Index) • Analytics (Aggregation, Mat.View & BRIN) • SQL (UPSERT) • Security (Row Level Security) • Replication and Beyond (Logical Decoding) • Administration (ALTER SYSTEM) • Infrastructure (For Parallelization) • Beyond 9.5
  • 5. 9.4 & 9.5 Overview
  • 6. 9.4 Status • The first official release. – 9.4 released on December 18th, 2014. • The latest stable release – 9.4.4 released on June 12th, 2015.
  • 7. 9.5 Status • Current Status – 9.5 Alpha 2 released on August 5th, 2015 • The first Beta (or another Alpha) will be coming in September. • The final release will be coming on late this year. http://www.postgresql.org/about/news/1604/
  • 8. Statistics • 9.4.4 - compared to 9.3.9 – 3,910 files changed. – 51,724 insertions (+) in *.c, *.h files – 16,387 deletions (-) • 9.5alpha2 - compared to 9.4.4 – 4,246 files changed. – 91,138 insertions (+) – 22,393 deletions (-)
  • 9. 9.4 Overview - Changes Lots of changes!!
  • 10. Categories of Enhancements • NoSQL (JSON and GIN Index) • Analytics (Aggregation, Mat.View & BRIN) • SQL (UPSERT) • Security (Row Level Security) • Replication+ (Logical Decoding) • Administration (ALTER SYSTEM) • Basic Infrastructure (Parallelization)
  • 12. NoSQL - JSONB • JSON (9.3) vs. JSONB (9.4)
  • 13. NoSQL - JSONB • “Binary JSON” – Different from JSON, a text representation – Faster for searching • With JSONB... – No duplicated keys allowed. Last wins. – Key order not preserved. – Can take advantages of GIN Index.
  • 14. NoSQL - JSONB Operator Description 9.4 -> Get an element by key as a JSON object ->> Get an element by key as a text object #> Get an element by path as a JSON object #>> Get an element by path as a text object <@, @> Evaluate whether a JSON object contains a key/value pair ? Evaluate whether a JSON object contains a key or a value ?| Evaluate whether a JSON object contains ANY of keys or values ?& Evaluate whether a JSON object contains ALL of keys or values 9.5 || Insert or Update an element to a JSON object - Delete an element by key from a JSON object #- Delete an element by path from a JSON object http://www.postgresql.org/docs/9.5/static/functions-json.html
  • 15. NoSQL - GIN Index • JSON+btree vs. JSONB+GIN – Btree indexes vs. GIN index http://www.slideshare.net/toshiharada/jpug-studyjsonbdatatype20141011-40103981 Table Index Size Comparison
  • 17. Analytics - Aggregation • FILTER replaces CASE WHEN.
  • 18. Analytics - Aggregation • New Aggregate Functions (New in 9.4) – percentile_cont() – percentile_disc() – mode() – rank() – dense_rank() – percent_rank() – cume_dist()
  • 19. Analytics - Aggregation • Ordered-set aggregates – mode(), most common value in a subset
  • 20. Analytics - Aggregation • Ordered-set aggregates – rank(), rank of a value in a subset
  • 21. Analytics - Aggregation • New in 9.5 –ROLLUP() –CUBE() –GROUPING SETS()
  • 22. Analytics - ROLLUP • Calculates total/subtotal values
  • 23. Analytics - CUBE • Calculates for all combinations of the specified columns
  • 24. Analytics – GROUPING SETS • Runs multiple GROUP BY queries at once Two GROUP BYs at once.
  • 25. Analytics – Materialized Views • REFRESH MATERIALIZED VIEW CONCURRENTLY myview • Refreshing a MV concurrently (in background) without exclusive lock. • Usability and availability improved.
  • 26. Analytics - BRIN Index • Block Range INdex (New in 9.5) – Holds "summary“ data, instead of raw data. – Reduces index size tremendously. – Also reduces creation/maintenance cost. – Needs extra tuple fetch to get the exact record. 0 50,000 100,000 150,000 200,000 250,000 300,000 Btree BRIN Elapsed time (ms) Index Creation 0 50,000 100,000 150,000 200,000 250,000 300,000 Btree BRIN Number of Blocks Index Size 0 2 4 6 8 10 12 14 16 18 Btree BRIN Elapsed time (ms) Select 1 record https://gist.github.com/snaga/82173bd49749ccf0fa6c
  • 27. Analytics - BRIN Index • Structure of BRIN Index Table File Block Range 1 (128 Blocks) Block Range 2 Block Range 3 Block Range Min. Value Max. Value 1 1992-01-02 1992-01-28 2 1992-01-27 1992-02-08 3 1992-02-08 1992-02-16 … … … Holds min/max values for “Block Ranges”, 128 blocks each (by default). (in case a date column)
  • 28. Analytics - TABLESAMPLE • Allows user to specify random BERNOULLI sampling or block level SYSTEM sampling – Would improve SELECT query performance • Need to specify – Sampling method (SYSTEM | BERNOULLI) – Fraction of the table (in a percentage) • Limitation – Currently accepts only on regular tables and materialized views http://www.postgresql.org/docs/9.5/static/sql-select.html
  • 29. Analytics - TABLESAMPLE • Calculating the average of total price. – With/without TABLESAMPLE
  • 30. Analytics - TABLESAMPLE Without TABLESAMPLE Cost: 44076 With SYSTEM Sampl. Cost: 1199 With BERNOULLI Sampl. Cost: 25513
  • 32. INSERT, or UPDATE? • “duplicate key violation” is one of the bothersome things in database programming
  • 33. INSERT … ON CONFLICT … • Now, you can INSERT or UPDATE in one statement with “ON CONFLICT”.
  • 34. INSERT … ON CONFLICT … INSERT INTO nation VALUES ( 12, ‐‐ n_nationkey 'JAPAN', ‐‐ n_name 2, ‐‐ n_regionkey 'Japan (Japanese: 日本 … in East Asia.' ‐‐ n_comment ) ON CONFLICT (n_nationkey) DO UPDATE SET n_comment = EXCLUDED.n_comment; http://www.postgresql.org/docs/9.5/static/sql-insert.html • This query updates n_comment column when INSERT conflicts on n_nationkey column.
  • 36. Row Level Security • Row Level Security (RLS) – Allows users to define access policy to determine which rows in the table should be returned. – Disabled by default. – CREATE POLICY, ALTER POLICY, DROP POLICY • Limitation – Not applicable to the system catalog http://www.postgresql.org/docs/9.5/static/ddl-rowsecurity.html
  • 37. Row Level Security • Multiple rows (user records) in the table. Define a policy to filter out with user name
  • 38. Row Level Security • Each user can see only own record. “user01” can see only “user01” record “user02” can see only “user02” record
  • 40. Replication and Beyond – Logical Decoding • “Logical” representation from replication stream – INSERT/UPDATE/DELETE operations – Can be replayed on different version/platform • pg_recvlogical command – Shows how it works • Replication can be more flexible – BDR (Bi-Directional Rep.), Slony, and more ... – Continuous Backup as well
  • 43. Administration - ALTER SYSTEM • ALTER SYSTEM SET – puts new value in postgresql.auto.conf – pg_reload_conf() reloads them. – postgresql.auto.conf takes priority over postgresql.conf. • ALTER SYSTEM RESET – Remove values from postgresql.auto.conf.
  • 45. Dynamic Background Workers • In 9.3, background workers must start at the postmaster (listener process) startup. • After 9.4, they can be launched “on-demand” basis. • From parallelization point of view... – It allows to launch multiple background processes to execute child queries in parallel.
  • 46. Dynamic Shared Memory • Shared memory can be allocated “on-demand” basis – Cf.) by background workers • Main segment (ex. shared_buffers) still fixed at startup • Also supports lightweight message queue • From parallelization point of view... – It allows to share data and communicate with several bgworker processes.
  • 49. There are many other enhancements, so please try it asap.
  • 51.
  • 52. Commitfest 2015-7~ CommitFest is a process to review, fix and commit the submitted patches. • Parallel Seq scan • Waits monitoring • Support multiple synchronous standby servers • and others.. Still work in progress... commitfest.postgresql.org
  • 53. Wrap-up • One of the most developer-friendly RDBMSes in the world. • Analytics features and the performance are improving. • Things are going to parallel.
  • 54. Resources • www.postgresql.org • www.planetpostgresql.org • www.pgcon.org • wiki.postgresql.org • www.postgresql.org/docs/9.5 • news.ycombinator.com/item?id=10039527
  • 55. Postgres Toolkit • A script collection to manage PostgreSQL – Helps DBA to perform complicated tasks – Consists of 13 scripts as of v0.2.2. • A "Victorinox" for PostgreSQL DBA • uptime.jp/go/pt
  • 56. SQL Firewall for Postgres SQL Injection prevented!
  • 57. pgDay Asia 2016 • As A Joint Event with FOSSASIA 2016 – 1 Day, 2 Tracks (not fixed yet) • FOSSASIA 2016 – March 18h-20th in Singapore • Still “Work In Progress”, but mark your calendar NOW! Photo by Michael Cannon https://flic.kr/p/rieAXe
  • 58. Any Question? • E-mail: snaga@uptime.jp • Twitter, Github: @snaga • WeChat: satoshinagayasu