SlideShare a Scribd company logo
1 of 43
Download to read offline
Introduction to PostgreSQL
Don’t Panic!
Federico Campoli
Brighton PostgreSQL Users Group
13 June 2016
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 1 / 40
Table of contents
1 An elephant never forgets
2 A quick look to a powerful tool
3 NOSQL on Acid
4 Wrap up
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 2 / 40
An elephant never forgets
Table of contents
1 An elephant never forgets
2 A quick look to a powerful tool
3 NOSQL on Acid
4 Wrap up
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 3 / 40
An elephant never forgets
An elephant never forgets
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 4 / 40
An elephant never forgets
PostgreSQL, an history of excellence
Created at Berkeley in 1982 by database’s legend Prof. Stonebraker
In the 1994 Andrew Yu and Jolly Chen added the SQL interpreter
In the 1996 becomes an Open Source project.
The project’s name changes in PostgreSQL
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 5 / 40
An elephant never forgets
PostgreSQL, an history of excellence
Created at Berkeley in 1982 by database’s legend Prof. Stonebraker
In the 1994 Andrew Yu and Jolly Chen added the SQL interpreter
In the 1996 becomes an Open Source project.
The project’s name changes in PostgreSQL
Fully ACID compliant
High performance in read/write with the MVCC
Tablespaces
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 5 / 40
An elephant never forgets
PostgreSQL, an history of excellence
Created at Berkeley in 1982 by database’s legend Prof. Stonebraker
In the 1994 Andrew Yu and Jolly Chen added the SQL interpreter
In the 1996 becomes an Open Source project.
The project’s name changes in PostgreSQL
Fully ACID compliant
High performance in read/write with the MVCC
Tablespaces
Runs on almost any unix flavour
From the version 8.0 is native on *cough* MS Windows *cough*
HA with hot standby and streaming replication
Heterogeneous federation
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 5 / 40
An elephant never forgets
PostgreSQL, an history of excellence
Created at Berkeley in 1982 by database’s legend Prof. Stonebraker
In the 1994 Andrew Yu and Jolly Chen added the SQL interpreter
In the 1996 becomes an Open Source project.
The project’s name changes in PostgreSQL
Fully ACID compliant
High performance in read/write with the MVCC
Tablespaces
Runs on almost any unix flavour
From the version 8.0 is native on *cough* MS Windows *cough*
HA with hot standby and streaming replication
Heterogeneous federation
Procedural languages (pl/pgsql, pl/python, pl/perl...)
Support for NOSQL features like HSTORE and JSON
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 5 / 40
An elephant never forgets
Development
Old ugly C language
New development cycle starts usually in June
New version released usually by the end of the year
At least 4 LTS versions
Can be extended using shared libraries
Extensions (9.1+)
BSD like license
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 6 / 40
An elephant never forgets
Limits
Database size. No limits.
Table size 32 TB
Row size 1.6 TB
Field size 1 GB
Rows in table. No limits.
Fields in table 250 - 1600 depending on data type.
Tables in a database. No limits.
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 7 / 40
A quick look to a powerful tool
Table of contents
1 An elephant never forgets
2 A quick look to a powerful tool
3 NOSQL on Acid
4 Wrap up
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 8 / 40
A quick look to a powerful tool
A quick look to a powerful tool
Image by Hein Waschefort -
http://commons.wikimedia.org/wiki/User:Hein waschefort
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 9 / 40
A quick look to a powerful tool
Data types
PostgreSQL comes with an incredibly rich data type set.
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 10 / 40
A quick look to a powerful tool
Data types
Numerical
smallint, integer, bigint
decimal, numeric, user-specified precision, exact
real,double precision, variable precision, inexact
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 11 / 40
A quick look to a powerful tool
Data types
Character
character
character varying with max size
text, character varying
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 12 / 40
A quick look to a powerful tool
Data types
Binary
bytea
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 13 / 40
A quick look to a powerful tool
Data types
Alongside the general purpose data types PostgreSQL have some exotic types.
Range (integers, date)
Geometric (points, lines etc.)
Network addresses
XML
JSON
JSONB
HSTORE (extension)
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 14 / 40
A quick look to a powerful tool
UPSERT (9.5+)
INSERT INTO t_table (i_id , v_value)
VALUES (1, ’fake value ’), (2, ’another fake value ’)
ON CONFLICT (i_id) DO UPDATE SET v_value = EXCLUDED.v_value;
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 15 / 40
A quick look to a powerful tool
Row Level Security (9.5+)
Row Level Security, allows security ”policies” filtering rows per database user.
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 16 / 40
A quick look to a powerful tool
Big Data! (9.5+)
BIG DATA!
BRIN - Block Range Indices
IMPORT FOREIGN SCHEMA, Federation with steroids
TABLESAMPLE
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 17 / 40
A quick look to a powerful tool
GROUPING SETS
GROUPING SETS (shameless copied from the on line manual)
The data selected by the FROM and WHERE clauses is grouped separately by
each specified grouping set, aggregates computed for each group just as for simple
GROUP BY clauses, and then the results returned. For example:
=> SELECT * FROM items_sold;
brand | size | sales
-- -----+------+-------
Foo | L | 10
Foo | M | 20
Bar | M | 15
Bar | L | 5
(4 rows)
=> SELECT brand , size , sum(sales) FROM items_sold GROUP BY GROUPING SETS ((
brand), (size), ());
brand | size | sum
-- -----+------+-----
Foo | | 30
Bar | | 20
| L | 15
| M | 35
| | 50
(5 rows)
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 18 / 40
A quick look to a powerful tool
The future
PostgreSQL 9.6
Currently in beta
Parallel sequential scans, joins and aggregates
Push down for the postgresql foreigh data wrapper
Full text search for phrases, YAY!
Multiple synchronous standby servers
Snapshot too old!
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 19 / 40
NOSQL on Acid
Table of contents
1 An elephant never forgets
2 A quick look to a powerful tool
3 NOSQL on Acid
4 Wrap up
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 20 / 40
NOSQL on Acid
NOSQL on Acid
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 21 / 40
NOSQL on Acid
JSON
JSON - JavaScript Object Notation
The version 9.2 adds JSON as native data type
The version 9.3 adds the support functions for JSON
JSON is stored as text
JSON is parsed and validated on the fly
The 9.4 adds JSONB (binary) data type
The 9.5 improves JSONB
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 22 / 40
NOSQL on Acid
JSON
JSON - Examples
From record to JSON
postgres=# SELECT row_to_json(ROW(1,’foo’));
row_to_json
---------------------
{"f1":1,"f2":"foo"}
(1 row)
Expanding JSON into key to value elements
postgres=# SELECT * from json_each(’{"a":"foo", "b":"bar"}’);
key | value
-----+-------
a | "foo"
b | "bar"
(2 rows)
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 23 / 40
NOSQL on Acid
JSONB
Because JSON is parsed and validated on the fly it could be a bottleneck.
The new JSONB introduced with PostgreSQL 9.4 is parsed, validated and
transformed at insert/update’s time. The access is then faster than the plain
JSON but the storage cost can be higher.
The functions available for JSON are also available in the JSONB flavour.
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 24 / 40
NOSQL on Acid
Some numbers
Let’s create three tables with text,json and jsonb type fields.
Each record contains the same json element generated on
http://beta.json-generator.com/4kwCt-fwg
[ {
"_id": "56891aba27402de7f551bc91",
"index": 0,
"guid": "b9345045-1222-4f71-9540-6ed7c8d2ccae",
"isActive": false,
............
3,
{
"id": 1,
"name": "Bridgett Shaw"
}
],
"greeting": "Hello, Johnston! You have 8 unread messages.",
"favoriteFruit": "apple"
}
]Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 25 / 40
NOSQL on Acid
Some numbers
DROP TABLE IF EXISTS t_json ;
DROP TABLE IF EXISTS t_jsonb ;
DROP TABLE IF EXISTS t_text ;
CREATE TABLE t_json as
SELECT
’<JSON ELEMENT >’:: json as js_value
FROM
generate_series (1 ,100000);
Query returned successfully : 100000 rows affected , 14504 ms execution time.
CREATE TABLE t_text as
SELECT
’<JSON ELEMENT >’:: text as t_value
FROM
generate_series (1 ,100000);
Query returned successfully : 100000 rows affected , 14330 ms execution time.
CREATE TABLE t_jsonb as
SELECT
’<JSON ELEMENT >’:: jsonb as jsb_value
FROM
generate_series (1 ,100000);
Query returned successfully : 100000 rows affected , 14060 ms execution time.
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 26 / 40
NOSQL on Acid
Table size
SELECT
pg_size_pretty ( pg_total_relation_size (oid)),
relname
FROM
pg_class
WHERE
relname LIKE ’t_%’
;
pg_size_pretty | relname
-- --------------+---------
270 MB | t_json
322 MB | t_jsonb
270 MB | t_text
(3 rows)
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 27 / 40
NOSQL on Acid
Sequential scans
TEXT
EXPLAIN (BUFFERS , ANALYZE) SELECT * FROM t_text;
Seq Scan on t_text (cost =0.00..1637.00 rows =100000 width =18) (actual time
=0.016..17.624 rows =100000 loops =1)
Buffers: shared hit =637
Planning time: 0.040 ms
Execution time: 28.967 ms
(4 rows)
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 28 / 40
NOSQL on Acid
Sequential scans
JSON
EXPLAIN (BUFFERS , ANALYZE) SELECT * FROM t_json;
Seq Scan on t_json (cost =0.00..1637.09 rows =100009 width =32) (actual time
=0.018..15.443 rows =100000 loops =1)
Buffers: shared hit =637
Planning time: 0.045 ms
Execution time: 25.268 ms
(4 rows)
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 29 / 40
NOSQL on Acid
Sequential scans
JSONB
EXPLAIN (BUFFERS , ANALYZE) SELECT * FROM t_jsonb;
Seq Scan on t_jsonb (cost =0.00..1637.00 rows =100000 width =18) (actual time
=0.015..18.943 rows =100000 loops =1)
Buffers: shared hit =637
Planning time: 0.043 ms
Execution time: 31.072 ms
(4 rows)
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 30 / 40
NOSQL on Acid
Sequential scan with json access
TEXT
EXPLAIN (BUFFERS , ANALYZE) SELECT t_value ::json ->’index ’ FROM t_text;
Seq Scan on t_text (cost =0.00..2387.00 rows =100000 width =18) (actual time
=0.159..7748.381 rows =100000 loops =1)
Buffers: shared hit =401729
Planning time: 0.028 ms
Execution time: 7760.263 ms
(4 rows)
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 31 / 40
NOSQL on Acid
Sequential scan with json access
JSON
EXPLAIN (BUFFERS , ANALYZE) SELECT js_value ->’index ’ FROM t_json;
Seq Scan on t_json (cost =0.00..1887.11 rows =100009 width =32) (actual time
=0.254..5787.267 rows =100000 loops =1)
Buffers: shared hit =401730
Planning time: 0.044 ms
Execution time: 5798.153 ms
(4 rows)
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 32 / 40
NOSQL on Acid
Sequential scan with json access
JSONB
EXPLAIN (BUFFERS , ANALYZE) SELECT jsb_value ->’index ’ FROM t_jsonb;
Seq Scan on t_jsonb (cost =0.00..1887.00 rows =100000 width =18) (actual time
=0.138..1678.222 rows =100000 loops =1)
Buffers: shared hit =421729
Planning time: 0.048 ms
Execution time: 1688.752 ms
(4 rows)
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 33 / 40
Wrap up
Table of contents
1 An elephant never forgets
2 A quick look to a powerful tool
3 NOSQL on Acid
4 Wrap up
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 34 / 40
Wrap up
Wrap up
PostgreSQL is a powerful RDBMS with dozens of features and capabilities.
Choosing the correctly what to use can be tricky.
The lack of horizontal scalability in PostgreSQL can be a problem for large data
sets. However, an interesting project for a distributed cluster is PostgreSQL XL -
http://www.postgres-xl.org/
Another cool project is CitusDB, a powerful extension to add to PostgreSQL
horizontal scale capabilities.
CitusDB recently un-forked from PostgreSQL becoming an open source extension.
Yay!
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 35 / 40
Wrap up
Wrap up
Schema less data are useful. They are flexible and powerful.
Never forget PostgreSQL is a RDBMS
Get a DBA on board
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 36 / 40
Wrap up
Questions
Questions?
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 37 / 40
Wrap up
Contacts
Twitter: 4thdoctor scarf
Personal blog: http://www.pgdba.co.uk
PostgreSQL Book:
http://www.slideshare.net/FedericoCampoli/postgresql-dba-01
Brighton PostgreSQL Meetup:
http://www.meetup.com/Brighton-PostgreSQL-Meetup/
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 38 / 40
Wrap up
License and copyright
This presentation is licensed under the terms of the Creative Commons
Attribution NonCommercial ShareAlike 4.0
http://creativecommons.org/licenses/by-nc-sa/4.0/
The cheetah photo is copyright by Hein Waschefort -
http://commons.wikimedia.org/wiki/User:Hein waschefort
The elephant logos are copyright of the PostgreSQL Global Development
Group - http://www.postgresql.org/
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 39 / 40
Wrap up
Introduction to PostgreSQL
Don’t Panic!
Federico Campoli
Brighton PostgreSQL Users Group
13 June 2016
Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 40 / 40

More Related Content

What's hot

a look at the postgresql engine
a look at the postgresql enginea look at the postgresql engine
a look at the postgresql engineFederico Campoli
 
The ninja elephant, scaling the analytics database in Transwerwise
The ninja elephant, scaling the analytics database in TranswerwiseThe ninja elephant, scaling the analytics database in Transwerwise
The ninja elephant, scaling the analytics database in TranswerwiseFederico Campoli
 
Pg chameleon MySQL to PostgreSQL replica
Pg chameleon MySQL to PostgreSQL replicaPg chameleon MySQL to PostgreSQL replica
Pg chameleon MySQL to PostgreSQL replicaFederico Campoli
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQLMark Wong
 
The ninja elephant, scaling the analytics database in Transwerwise
The ninja elephant, scaling the analytics database in TranswerwiseThe ninja elephant, scaling the analytics database in Transwerwise
The ninja elephant, scaling the analytics database in TranswerwiseFederico Campoli
 
pg_chameleon MySQL to PostgreSQL replica made easy
pg_chameleon  MySQL to PostgreSQL replica made easypg_chameleon  MySQL to PostgreSQL replica made easy
pg_chameleon MySQL to PostgreSQL replica made easyFederico Campoli
 
Solving PostgreSQL wicked problems
Solving PostgreSQL wicked problemsSolving PostgreSQL wicked problems
Solving PostgreSQL wicked problemsAlexander Korotkov
 
NoSQL and Triple Stores
NoSQL and Triple StoresNoSQL and Triple Stores
NoSQL and Triple Storesandyseaborne
 
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
 
(An Overview on) Linked Data Management and SPARQL Querying (ISSLOD2011)
(An Overview on) Linked Data Management and SPARQL Querying (ISSLOD2011)(An Overview on) Linked Data Management and SPARQL Querying (ISSLOD2011)
(An Overview on) Linked Data Management and SPARQL Querying (ISSLOD2011)Olaf Hartig
 
Rank Your Results with PostgreSQL Full Text Search (from PGConf2015)
Rank Your Results with PostgreSQL Full Text Search (from PGConf2015)Rank Your Results with PostgreSQL Full Text Search (from PGConf2015)
Rank Your Results with PostgreSQL Full Text Search (from PGConf2015)Jamey Hanson
 
Datasets and tools_from_ncbi_and_elsewhere_for_microbiome_research_v_62817
Datasets and tools_from_ncbi_and_elsewhere_for_microbiome_research_v_62817Datasets and tools_from_ncbi_and_elsewhere_for_microbiome_research_v_62817
Datasets and tools_from_ncbi_and_elsewhere_for_microbiome_research_v_62817Ben Busby
 
Pg 95 new capabilities
Pg 95 new capabilitiesPg 95 new capabilities
Pg 95 new capabilitiesJamey Hanson
 
RDFox Poster
RDFox PosterRDFox Poster
RDFox PosterDBOnto
 
Pg chameleon, mysql to postgresql replica made easy
Pg chameleon, mysql to postgresql replica made easyPg chameleon, mysql to postgresql replica made easy
Pg chameleon, mysql to postgresql replica made easyFederico Campoli
 
2016 bioinformatics i_io_wim_vancriekinge
2016 bioinformatics i_io_wim_vancriekinge2016 bioinformatics i_io_wim_vancriekinge
2016 bioinformatics i_io_wim_vancriekingeProf. Wim Van Criekinge
 

What's hot (20)

a look at the postgresql engine
a look at the postgresql enginea look at the postgresql engine
a look at the postgresql engine
 
The ninja elephant, scaling the analytics database in Transwerwise
The ninja elephant, scaling the analytics database in TranswerwiseThe ninja elephant, scaling the analytics database in Transwerwise
The ninja elephant, scaling the analytics database in Transwerwise
 
Hitchikers guide handout
Hitchikers guide handoutHitchikers guide handout
Hitchikers guide handout
 
Pg chameleon MySQL to PostgreSQL replica
Pg chameleon MySQL to PostgreSQL replicaPg chameleon MySQL to PostgreSQL replica
Pg chameleon MySQL to PostgreSQL replica
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQL
 
The ninja elephant, scaling the analytics database in Transwerwise
The ninja elephant, scaling the analytics database in TranswerwiseThe ninja elephant, scaling the analytics database in Transwerwise
The ninja elephant, scaling the analytics database in Transwerwise
 
Streaming replication
Streaming replicationStreaming replication
Streaming replication
 
pg_chameleon MySQL to PostgreSQL replica made easy
pg_chameleon  MySQL to PostgreSQL replica made easypg_chameleon  MySQL to PostgreSQL replica made easy
pg_chameleon MySQL to PostgreSQL replica made easy
 
Solving PostgreSQL wicked problems
Solving PostgreSQL wicked problemsSolving PostgreSQL wicked problems
Solving PostgreSQL wicked problems
 
NoSQL and Triple Stores
NoSQL and Triple StoresNoSQL and Triple Stores
NoSQL and Triple Stores
 
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
 
(An Overview on) Linked Data Management and SPARQL Querying (ISSLOD2011)
(An Overview on) Linked Data Management and SPARQL Querying (ISSLOD2011)(An Overview on) Linked Data Management and SPARQL Querying (ISSLOD2011)
(An Overview on) Linked Data Management and SPARQL Querying (ISSLOD2011)
 
Rank Your Results with PostgreSQL Full Text Search (from PGConf2015)
Rank Your Results with PostgreSQL Full Text Search (from PGConf2015)Rank Your Results with PostgreSQL Full Text Search (from PGConf2015)
Rank Your Results with PostgreSQL Full Text Search (from PGConf2015)
 
Datasets and tools_from_ncbi_and_elsewhere_for_microbiome_research_v_62817
Datasets and tools_from_ncbi_and_elsewhere_for_microbiome_research_v_62817Datasets and tools_from_ncbi_and_elsewhere_for_microbiome_research_v_62817
Datasets and tools_from_ncbi_and_elsewhere_for_microbiome_research_v_62817
 
Pg 95 new capabilities
Pg 95 new capabilitiesPg 95 new capabilities
Pg 95 new capabilities
 
RDFox Poster
RDFox PosterRDFox Poster
RDFox Poster
 
Bio2RDF@BH2010
Bio2RDF@BH2010Bio2RDF@BH2010
Bio2RDF@BH2010
 
Pg chameleon, mysql to postgresql replica made easy
Pg chameleon, mysql to postgresql replica made easyPg chameleon, mysql to postgresql replica made easy
Pg chameleon, mysql to postgresql replica made easy
 
2016 bioinformatics i_io_wim_vancriekinge
2016 bioinformatics i_io_wim_vancriekinge2016 bioinformatics i_io_wim_vancriekinge
2016 bioinformatics i_io_wim_vancriekinge
 
2016 02 23_biological_databases_part1
2016 02 23_biological_databases_part12016 02 23_biological_databases_part1
2016 02 23_biological_databases_part1
 

Viewers also liked

Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1Federico Campoli
 
Truong-Nhat-Ha-Duyen
Truong-Nhat-Ha-DuyenTruong-Nhat-Ha-Duyen
Truong-Nhat-Ha-DuyenDuyen Nhat Ha
 
C1657 ac1 martin_cristina_presentaciocontinguts
C1657 ac1 martin_cristina_presentaciocontingutsC1657 ac1 martin_cristina_presentaciocontinguts
C1657 ac1 martin_cristina_presentaciocontingutsusuaria1971
 
C1657 ac1 martin_cristina_presentaciocontinguts
C1657 ac1 martin_cristina_presentaciocontingutsC1657 ac1 martin_cristina_presentaciocontinguts
C1657 ac1 martin_cristina_presentaciocontingutsusuaria1971
 
Desventajas y ventajas tecnológicas
Desventajas y ventajas tecnológicasDesventajas y ventajas tecnológicas
Desventajas y ventajas tecnológicasIanelka18
 
C1657 pf martin_cristina_informe
C1657 pf martin_cristina_informeC1657 pf martin_cristina_informe
C1657 pf martin_cristina_informeusuaria1971
 
Overview-of-History-of-Irish-Animation-Copy
Overview-of-History-of-Irish-Animation-CopyOverview-of-History-of-Irish-Animation-Copy
Overview-of-History-of-Irish-Animation-CopyIseult Travers
 
PUGS Meetup Presentation - 11062015
PUGS Meetup Presentation - 11062015PUGS Meetup Presentation - 11062015
PUGS Meetup Presentation - 11062015Wei Shan Ang
 
SP DIT Bonding Day - 05062015
SP DIT Bonding Day - 05062015SP DIT Bonding Day - 05062015
SP DIT Bonding Day - 05062015Wei Shan Ang
 
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)Wei Shan Ang
 
Puppet Camp Singapore 2015 - 19th Nov 2015 Presentation (1)
Puppet Camp Singapore 2015 - 19th Nov 2015 Presentation (1)Puppet Camp Singapore 2015 - 19th Nov 2015 Presentation (1)
Puppet Camp Singapore 2015 - 19th Nov 2015 Presentation (1)Wei Shan Ang
 

Viewers also liked (17)

Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1
 
Industria del papel
Industria del papelIndustria del papel
Industria del papel
 
Maphuti
MaphutiMaphuti
Maphuti
 
Truong-Nhat-Ha-Duyen
Truong-Nhat-Ha-DuyenTruong-Nhat-Ha-Duyen
Truong-Nhat-Ha-Duyen
 
C1657 ac1 martin_cristina_presentaciocontinguts
C1657 ac1 martin_cristina_presentaciocontingutsC1657 ac1 martin_cristina_presentaciocontinguts
C1657 ac1 martin_cristina_presentaciocontinguts
 
Maphuti
MaphutiMaphuti
Maphuti
 
C1657 ac1 martin_cristina_presentaciocontinguts
C1657 ac1 martin_cristina_presentaciocontingutsC1657 ac1 martin_cristina_presentaciocontinguts
C1657 ac1 martin_cristina_presentaciocontinguts
 
Desventajas y ventajas tecnológicas
Desventajas y ventajas tecnológicasDesventajas y ventajas tecnológicas
Desventajas y ventajas tecnológicas
 
Sistemas operativos
Sistemas operativosSistemas operativos
Sistemas operativos
 
NEW CV
NEW CVNEW CV
NEW CV
 
C1657 pf martin_cristina_informe
C1657 pf martin_cristina_informeC1657 pf martin_cristina_informe
C1657 pf martin_cristina_informe
 
Overview-of-History-of-Irish-Animation-Copy
Overview-of-History-of-Irish-Animation-CopyOverview-of-History-of-Irish-Animation-Copy
Overview-of-History-of-Irish-Animation-Copy
 
Expo
ExpoExpo
Expo
 
PUGS Meetup Presentation - 11062015
PUGS Meetup Presentation - 11062015PUGS Meetup Presentation - 11062015
PUGS Meetup Presentation - 11062015
 
SP DIT Bonding Day - 05062015
SP DIT Bonding Day - 05062015SP DIT Bonding Day - 05062015
SP DIT Bonding Day - 05062015
 
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)
 
Puppet Camp Singapore 2015 - 19th Nov 2015 Presentation (1)
Puppet Camp Singapore 2015 - 19th Nov 2015 Presentation (1)Puppet Camp Singapore 2015 - 19th Nov 2015 Presentation (1)
Puppet Camp Singapore 2015 - 19th Nov 2015 Presentation (1)
 

Similar to Don't panic! - Postgres introduction

Ontop: Answering SPARQL Queries over Relational Databases
Ontop: Answering SPARQL Queries over Relational DatabasesOntop: Answering SPARQL Queries over Relational Databases
Ontop: Answering SPARQL Queries over Relational DatabasesGuohui Xiao
 
Semantic Pipes and Semantic Mashups
Semantic Pipes and Semantic MashupsSemantic Pipes and Semantic Mashups
Semantic Pipes and Semantic Mashupsgiurca
 
Using PostgreSQL with Bibliographic Data
Using PostgreSQL with Bibliographic DataUsing PostgreSQL with Bibliographic Data
Using PostgreSQL with Bibliographic DataJimmy Angelakos
 
Batch import of large RDF datasets into Semantic MediaWiki
Batch import of large RDF datasets into Semantic MediaWikiBatch import of large RDF datasets into Semantic MediaWiki
Batch import of large RDF datasets into Semantic MediaWikiSamuel Lampa
 
What is a distributed data science pipeline. how with apache spark and friends.
What is a distributed data science pipeline. how with apache spark and friends.What is a distributed data science pipeline. how with apache spark and friends.
What is a distributed data science pipeline. how with apache spark and friends.Andy Petrella
 
postgres loader
postgres loaderpostgres loader
postgres loaderINRIA-OAK
 
Programmability in spss 15
Programmability in spss 15Programmability in spss 15
Programmability in spss 15Armand Ruis
 
Querying the Web of Data with XSPARQL 1.1
Querying the Web of Data with XSPARQL 1.1Querying the Web of Data with XSPARQL 1.1
Querying the Web of Data with XSPARQL 1.1Daniele Dell'Aglio
 
Building Robust ETL Pipelines with Apache Spark
Building Robust ETL Pipelines with Apache SparkBuilding Robust ETL Pipelines with Apache Spark
Building Robust ETL Pipelines with Apache SparkDatabricks
 
Towards a rebirth of data science (by Data Fellas)
Towards a rebirth of data science (by Data Fellas)Towards a rebirth of data science (by Data Fellas)
Towards a rebirth of data science (by Data Fellas)Andy Petrella
 
Link Discovery Tutorial Part III: Benchmarking for Instance Matching Systems
Link Discovery Tutorial Part III: Benchmarking for Instance Matching SystemsLink Discovery Tutorial Part III: Benchmarking for Instance Matching Systems
Link Discovery Tutorial Part III: Benchmarking for Instance Matching SystemsHolistic Benchmarking of Big Linked Data
 
Programmability in spss 14, 15 and 16
Programmability in spss 14, 15 and 16Programmability in spss 14, 15 and 16
Programmability in spss 14, 15 and 16Armand Ruis
 
GraphConnect Europe 2016 - Enterprise Data Integration with a new JDBC Driver...
GraphConnect Europe 2016 - Enterprise Data Integration with a new JDBC Driver...GraphConnect Europe 2016 - Enterprise Data Integration with a new JDBC Driver...
GraphConnect Europe 2016 - Enterprise Data Integration with a new JDBC Driver...Neo4j
 
Wait! What’s going on inside my database?
Wait! What’s going on inside my database?Wait! What’s going on inside my database?
Wait! What’s going on inside my database?Jeremy Schneider
 
How to contribute PostgreSQL
How to contribute PostgreSQLHow to contribute PostgreSQL
How to contribute PostgreSQLHari Babu kommi
 
Softshake 2013: Introduction to NoSQL with Couchbase
Softshake 2013: Introduction to NoSQL with CouchbaseSoftshake 2013: Introduction to NoSQL with Couchbase
Softshake 2013: Introduction to NoSQL with CouchbaseTugdual Grall
 
Ontology-Based Data Access with Ontop
Ontology-Based Data Access with OntopOntology-Based Data Access with Ontop
Ontology-Based Data Access with OntopBenjamin Cogrel
 

Similar to Don't panic! - Postgres introduction (20)

Ontop: Answering SPARQL Queries over Relational Databases
Ontop: Answering SPARQL Queries over Relational DatabasesOntop: Answering SPARQL Queries over Relational Databases
Ontop: Answering SPARQL Queries over Relational Databases
 
Link Discovery Tutorial Part V: Hands-On
Link Discovery Tutorial Part V: Hands-OnLink Discovery Tutorial Part V: Hands-On
Link Discovery Tutorial Part V: Hands-On
 
Semantic Pipes and Semantic Mashups
Semantic Pipes and Semantic MashupsSemantic Pipes and Semantic Mashups
Semantic Pipes and Semantic Mashups
 
Using PostgreSQL with Bibliographic Data
Using PostgreSQL with Bibliographic DataUsing PostgreSQL with Bibliographic Data
Using PostgreSQL with Bibliographic Data
 
Batch import of large RDF datasets into Semantic MediaWiki
Batch import of large RDF datasets into Semantic MediaWikiBatch import of large RDF datasets into Semantic MediaWiki
Batch import of large RDF datasets into Semantic MediaWiki
 
What is a distributed data science pipeline. how with apache spark and friends.
What is a distributed data science pipeline. how with apache spark and friends.What is a distributed data science pipeline. how with apache spark and friends.
What is a distributed data science pipeline. how with apache spark and friends.
 
postgres loader
postgres loaderpostgres loader
postgres loader
 
Programmability in spss 15
Programmability in spss 15Programmability in spss 15
Programmability in spss 15
 
Querying the Web of Data with XSPARQL 1.1
Querying the Web of Data with XSPARQL 1.1Querying the Web of Data with XSPARQL 1.1
Querying the Web of Data with XSPARQL 1.1
 
Building Robust ETL Pipelines with Apache Spark
Building Robust ETL Pipelines with Apache SparkBuilding Robust ETL Pipelines with Apache Spark
Building Robust ETL Pipelines with Apache Spark
 
Towards a rebirth of data science (by Data Fellas)
Towards a rebirth of data science (by Data Fellas)Towards a rebirth of data science (by Data Fellas)
Towards a rebirth of data science (by Data Fellas)
 
Link Discovery Tutorial Part III: Benchmarking for Instance Matching Systems
Link Discovery Tutorial Part III: Benchmarking for Instance Matching SystemsLink Discovery Tutorial Part III: Benchmarking for Instance Matching Systems
Link Discovery Tutorial Part III: Benchmarking for Instance Matching Systems
 
Programmability in spss 14, 15 and 16
Programmability in spss 14, 15 and 16Programmability in spss 14, 15 and 16
Programmability in spss 14, 15 and 16
 
GraphConnect Europe 2016 - Enterprise Data Integration with a new JDBC Driver...
GraphConnect Europe 2016 - Enterprise Data Integration with a new JDBC Driver...GraphConnect Europe 2016 - Enterprise Data Integration with a new JDBC Driver...
GraphConnect Europe 2016 - Enterprise Data Integration with a new JDBC Driver...
 
Wait! What’s going on inside my database?
Wait! What’s going on inside my database?Wait! What’s going on inside my database?
Wait! What’s going on inside my database?
 
How to contribute PostgreSQL
How to contribute PostgreSQLHow to contribute PostgreSQL
How to contribute PostgreSQL
 
Softshake 2013: Introduction to NoSQL with Couchbase
Softshake 2013: Introduction to NoSQL with CouchbaseSoftshake 2013: Introduction to NoSQL with Couchbase
Softshake 2013: Introduction to NoSQL with Couchbase
 
2014 moore-ddd
2014 moore-ddd2014 moore-ddd
2014 moore-ddd
 
Jdk 10 sneak peek
Jdk 10 sneak peekJdk 10 sneak peek
Jdk 10 sneak peek
 
Ontology-Based Data Access with Ontop
Ontology-Based Data Access with OntopOntology-Based Data Access with Ontop
Ontology-Based Data Access with Ontop
 

Recently uploaded

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Recently uploaded (20)

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

Don't panic! - Postgres introduction

  • 1. Introduction to PostgreSQL Don’t Panic! Federico Campoli Brighton PostgreSQL Users Group 13 June 2016 Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 1 / 40
  • 2. Table of contents 1 An elephant never forgets 2 A quick look to a powerful tool 3 NOSQL on Acid 4 Wrap up Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 2 / 40
  • 3. An elephant never forgets Table of contents 1 An elephant never forgets 2 A quick look to a powerful tool 3 NOSQL on Acid 4 Wrap up Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 3 / 40
  • 4. An elephant never forgets An elephant never forgets Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 4 / 40
  • 5. An elephant never forgets PostgreSQL, an history of excellence Created at Berkeley in 1982 by database’s legend Prof. Stonebraker In the 1994 Andrew Yu and Jolly Chen added the SQL interpreter In the 1996 becomes an Open Source project. The project’s name changes in PostgreSQL Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 5 / 40
  • 6. An elephant never forgets PostgreSQL, an history of excellence Created at Berkeley in 1982 by database’s legend Prof. Stonebraker In the 1994 Andrew Yu and Jolly Chen added the SQL interpreter In the 1996 becomes an Open Source project. The project’s name changes in PostgreSQL Fully ACID compliant High performance in read/write with the MVCC Tablespaces Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 5 / 40
  • 7. An elephant never forgets PostgreSQL, an history of excellence Created at Berkeley in 1982 by database’s legend Prof. Stonebraker In the 1994 Andrew Yu and Jolly Chen added the SQL interpreter In the 1996 becomes an Open Source project. The project’s name changes in PostgreSQL Fully ACID compliant High performance in read/write with the MVCC Tablespaces Runs on almost any unix flavour From the version 8.0 is native on *cough* MS Windows *cough* HA with hot standby and streaming replication Heterogeneous federation Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 5 / 40
  • 8. An elephant never forgets PostgreSQL, an history of excellence Created at Berkeley in 1982 by database’s legend Prof. Stonebraker In the 1994 Andrew Yu and Jolly Chen added the SQL interpreter In the 1996 becomes an Open Source project. The project’s name changes in PostgreSQL Fully ACID compliant High performance in read/write with the MVCC Tablespaces Runs on almost any unix flavour From the version 8.0 is native on *cough* MS Windows *cough* HA with hot standby and streaming replication Heterogeneous federation Procedural languages (pl/pgsql, pl/python, pl/perl...) Support for NOSQL features like HSTORE and JSON Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 5 / 40
  • 9. An elephant never forgets Development Old ugly C language New development cycle starts usually in June New version released usually by the end of the year At least 4 LTS versions Can be extended using shared libraries Extensions (9.1+) BSD like license Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 6 / 40
  • 10. An elephant never forgets Limits Database size. No limits. Table size 32 TB Row size 1.6 TB Field size 1 GB Rows in table. No limits. Fields in table 250 - 1600 depending on data type. Tables in a database. No limits. Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 7 / 40
  • 11. A quick look to a powerful tool Table of contents 1 An elephant never forgets 2 A quick look to a powerful tool 3 NOSQL on Acid 4 Wrap up Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 8 / 40
  • 12. A quick look to a powerful tool A quick look to a powerful tool Image by Hein Waschefort - http://commons.wikimedia.org/wiki/User:Hein waschefort Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 9 / 40
  • 13. A quick look to a powerful tool Data types PostgreSQL comes with an incredibly rich data type set. Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 10 / 40
  • 14. A quick look to a powerful tool Data types Numerical smallint, integer, bigint decimal, numeric, user-specified precision, exact real,double precision, variable precision, inexact Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 11 / 40
  • 15. A quick look to a powerful tool Data types Character character character varying with max size text, character varying Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 12 / 40
  • 16. A quick look to a powerful tool Data types Binary bytea Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 13 / 40
  • 17. A quick look to a powerful tool Data types Alongside the general purpose data types PostgreSQL have some exotic types. Range (integers, date) Geometric (points, lines etc.) Network addresses XML JSON JSONB HSTORE (extension) Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 14 / 40
  • 18. A quick look to a powerful tool UPSERT (9.5+) INSERT INTO t_table (i_id , v_value) VALUES (1, ’fake value ’), (2, ’another fake value ’) ON CONFLICT (i_id) DO UPDATE SET v_value = EXCLUDED.v_value; Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 15 / 40
  • 19. A quick look to a powerful tool Row Level Security (9.5+) Row Level Security, allows security ”policies” filtering rows per database user. Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 16 / 40
  • 20. A quick look to a powerful tool Big Data! (9.5+) BIG DATA! BRIN - Block Range Indices IMPORT FOREIGN SCHEMA, Federation with steroids TABLESAMPLE Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 17 / 40
  • 21. A quick look to a powerful tool GROUPING SETS GROUPING SETS (shameless copied from the on line manual) The data selected by the FROM and WHERE clauses is grouped separately by each specified grouping set, aggregates computed for each group just as for simple GROUP BY clauses, and then the results returned. For example: => SELECT * FROM items_sold; brand | size | sales -- -----+------+------- Foo | L | 10 Foo | M | 20 Bar | M | 15 Bar | L | 5 (4 rows) => SELECT brand , size , sum(sales) FROM items_sold GROUP BY GROUPING SETS (( brand), (size), ()); brand | size | sum -- -----+------+----- Foo | | 30 Bar | | 20 | L | 15 | M | 35 | | 50 (5 rows) Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 18 / 40
  • 22. A quick look to a powerful tool The future PostgreSQL 9.6 Currently in beta Parallel sequential scans, joins and aggregates Push down for the postgresql foreigh data wrapper Full text search for phrases, YAY! Multiple synchronous standby servers Snapshot too old! Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 19 / 40
  • 23. NOSQL on Acid Table of contents 1 An elephant never forgets 2 A quick look to a powerful tool 3 NOSQL on Acid 4 Wrap up Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 20 / 40
  • 24. NOSQL on Acid NOSQL on Acid Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 21 / 40
  • 25. NOSQL on Acid JSON JSON - JavaScript Object Notation The version 9.2 adds JSON as native data type The version 9.3 adds the support functions for JSON JSON is stored as text JSON is parsed and validated on the fly The 9.4 adds JSONB (binary) data type The 9.5 improves JSONB Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 22 / 40
  • 26. NOSQL on Acid JSON JSON - Examples From record to JSON postgres=# SELECT row_to_json(ROW(1,’foo’)); row_to_json --------------------- {"f1":1,"f2":"foo"} (1 row) Expanding JSON into key to value elements postgres=# SELECT * from json_each(’{"a":"foo", "b":"bar"}’); key | value -----+------- a | "foo" b | "bar" (2 rows) Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 23 / 40
  • 27. NOSQL on Acid JSONB Because JSON is parsed and validated on the fly it could be a bottleneck. The new JSONB introduced with PostgreSQL 9.4 is parsed, validated and transformed at insert/update’s time. The access is then faster than the plain JSON but the storage cost can be higher. The functions available for JSON are also available in the JSONB flavour. Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 24 / 40
  • 28. NOSQL on Acid Some numbers Let’s create three tables with text,json and jsonb type fields. Each record contains the same json element generated on http://beta.json-generator.com/4kwCt-fwg [ { "_id": "56891aba27402de7f551bc91", "index": 0, "guid": "b9345045-1222-4f71-9540-6ed7c8d2ccae", "isActive": false, ............ 3, { "id": 1, "name": "Bridgett Shaw" } ], "greeting": "Hello, Johnston! You have 8 unread messages.", "favoriteFruit": "apple" } ]Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 25 / 40
  • 29. NOSQL on Acid Some numbers DROP TABLE IF EXISTS t_json ; DROP TABLE IF EXISTS t_jsonb ; DROP TABLE IF EXISTS t_text ; CREATE TABLE t_json as SELECT ’<JSON ELEMENT >’:: json as js_value FROM generate_series (1 ,100000); Query returned successfully : 100000 rows affected , 14504 ms execution time. CREATE TABLE t_text as SELECT ’<JSON ELEMENT >’:: text as t_value FROM generate_series (1 ,100000); Query returned successfully : 100000 rows affected , 14330 ms execution time. CREATE TABLE t_jsonb as SELECT ’<JSON ELEMENT >’:: jsonb as jsb_value FROM generate_series (1 ,100000); Query returned successfully : 100000 rows affected , 14060 ms execution time. Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 26 / 40
  • 30. NOSQL on Acid Table size SELECT pg_size_pretty ( pg_total_relation_size (oid)), relname FROM pg_class WHERE relname LIKE ’t_%’ ; pg_size_pretty | relname -- --------------+--------- 270 MB | t_json 322 MB | t_jsonb 270 MB | t_text (3 rows) Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 27 / 40
  • 31. NOSQL on Acid Sequential scans TEXT EXPLAIN (BUFFERS , ANALYZE) SELECT * FROM t_text; Seq Scan on t_text (cost =0.00..1637.00 rows =100000 width =18) (actual time =0.016..17.624 rows =100000 loops =1) Buffers: shared hit =637 Planning time: 0.040 ms Execution time: 28.967 ms (4 rows) Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 28 / 40
  • 32. NOSQL on Acid Sequential scans JSON EXPLAIN (BUFFERS , ANALYZE) SELECT * FROM t_json; Seq Scan on t_json (cost =0.00..1637.09 rows =100009 width =32) (actual time =0.018..15.443 rows =100000 loops =1) Buffers: shared hit =637 Planning time: 0.045 ms Execution time: 25.268 ms (4 rows) Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 29 / 40
  • 33. NOSQL on Acid Sequential scans JSONB EXPLAIN (BUFFERS , ANALYZE) SELECT * FROM t_jsonb; Seq Scan on t_jsonb (cost =0.00..1637.00 rows =100000 width =18) (actual time =0.015..18.943 rows =100000 loops =1) Buffers: shared hit =637 Planning time: 0.043 ms Execution time: 31.072 ms (4 rows) Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 30 / 40
  • 34. NOSQL on Acid Sequential scan with json access TEXT EXPLAIN (BUFFERS , ANALYZE) SELECT t_value ::json ->’index ’ FROM t_text; Seq Scan on t_text (cost =0.00..2387.00 rows =100000 width =18) (actual time =0.159..7748.381 rows =100000 loops =1) Buffers: shared hit =401729 Planning time: 0.028 ms Execution time: 7760.263 ms (4 rows) Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 31 / 40
  • 35. NOSQL on Acid Sequential scan with json access JSON EXPLAIN (BUFFERS , ANALYZE) SELECT js_value ->’index ’ FROM t_json; Seq Scan on t_json (cost =0.00..1887.11 rows =100009 width =32) (actual time =0.254..5787.267 rows =100000 loops =1) Buffers: shared hit =401730 Planning time: 0.044 ms Execution time: 5798.153 ms (4 rows) Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 32 / 40
  • 36. NOSQL on Acid Sequential scan with json access JSONB EXPLAIN (BUFFERS , ANALYZE) SELECT jsb_value ->’index ’ FROM t_jsonb; Seq Scan on t_jsonb (cost =0.00..1887.00 rows =100000 width =18) (actual time =0.138..1678.222 rows =100000 loops =1) Buffers: shared hit =421729 Planning time: 0.048 ms Execution time: 1688.752 ms (4 rows) Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 33 / 40
  • 37. Wrap up Table of contents 1 An elephant never forgets 2 A quick look to a powerful tool 3 NOSQL on Acid 4 Wrap up Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 34 / 40
  • 38. Wrap up Wrap up PostgreSQL is a powerful RDBMS with dozens of features and capabilities. Choosing the correctly what to use can be tricky. The lack of horizontal scalability in PostgreSQL can be a problem for large data sets. However, an interesting project for a distributed cluster is PostgreSQL XL - http://www.postgres-xl.org/ Another cool project is CitusDB, a powerful extension to add to PostgreSQL horizontal scale capabilities. CitusDB recently un-forked from PostgreSQL becoming an open source extension. Yay! Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 35 / 40
  • 39. Wrap up Wrap up Schema less data are useful. They are flexible and powerful. Never forget PostgreSQL is a RDBMS Get a DBA on board Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 36 / 40
  • 40. Wrap up Questions Questions? Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 37 / 40
  • 41. Wrap up Contacts Twitter: 4thdoctor scarf Personal blog: http://www.pgdba.co.uk PostgreSQL Book: http://www.slideshare.net/FedericoCampoli/postgresql-dba-01 Brighton PostgreSQL Meetup: http://www.meetup.com/Brighton-PostgreSQL-Meetup/ Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 38 / 40
  • 42. Wrap up License and copyright This presentation is licensed under the terms of the Creative Commons Attribution NonCommercial ShareAlike 4.0 http://creativecommons.org/licenses/by-nc-sa/4.0/ The cheetah photo is copyright by Hein Waschefort - http://commons.wikimedia.org/wiki/User:Hein waschefort The elephant logos are copyright of the PostgreSQL Global Development Group - http://www.postgresql.org/ Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 39 / 40
  • 43. Wrap up Introduction to PostgreSQL Don’t Panic! Federico Campoli Brighton PostgreSQL Users Group 13 June 2016 Federico Campoli (Brighton PostgreSQL Users Group) Introduction to PostgreSQL 13 June 2016 40 / 40