SlideShare a Scribd company logo
PostgreSQL 
Bye, the dolphin. Hello, the elephant. 
Kate Marshalkina 
marshalkina@licel.ru 
@kalabro
PostgreSQL 
Пост-Грес-Кью-Эль или просто Постгрес
Faster, better, stronger 
• PostgreSQL 100500x faster that MySQL and Oracle DB 
• 200k times more reliable 
• 13 times more secure 
• 221 times cheaper 
• ...∞
Faster, better, stronger 
• PostgreSQL 100500x faster that MySQL and Oracle DB 
• 200k times more reliable 
• 13 times more secure 
??? 
• 221 times cheaper 
• ...∞ 
Well, I don’t know.
> whoami 
Kate Marshalkina, Senior Web Developer (not a DBA!) 
6 year of PHP, 3 years 4 months * with Drupal + Postgres 
https://www.drupal.org/u/kalabro and @kalabro 
marshalkina@licel.ru 
* According to Drupal.org. 5 years 27 weeks according to Drupal.ru.
Agenda 
• About PostgreSQL 
• Install Drupal + PostgreSQL 
• Discover why it works (Drupal DBAL) 
• The most important slide #3 
• Who you are in Drupal dev world and what to do with it? 
• Links
Who uses PostgreSQL
PostgreSQL 
• Object-relational 
• True open source 
• Follows standards (ANSI-SQL, ACID) 
• MVCC 
• Sophisticated query planner/optimizer 
• Replication
PostgreSQL (advanced) 
• Inherited tables 
• Huge amount of build-in data types + custom types 
• Advanced indexes (compound, unique, partial, functional) 
• Stored procedures 
• Full text search (FTS) 
• JSON(B) 
• Extensions (hstore, PostGIS, dblink, …) 
http://www.postgresql.org/docs/9.3/static/contrib.html
PostgreSQL Feature Matrix 
http://www.postgresql.org/about/featurematrix/
Latest stable: 9.3 
9.4 RC1 released
JSON? 
Simple Key=Value (hstore) supported since 8.3 
Full JSON (jsonb) with indexes — in PostgreSQL 9.4! 
Thanks to dev team: 
Олег Бартунов, Александр Коротков, Федор Сигаев
PostgreSQL grows fast 
http://momjian.us/main/blogs/pgblog/2014.html#November_11_2014
Install PostgreSQL + Drupal 
1. Install Postgres 
The most difficult part: pg_hba.conf 
2. Run pgtune (optionally) 
3. Install php5-pgsql 
4. Install Drupal
Manage PostgreSQL 
CLI: psql 
UI: pgAdmin, phppgadmin
First time vocabulary 
• User postgres 
sudo -u postgres psql 
• Templates for databases 
• Schema 
• Autovacuum 
• ~/.pgpass
SA-CORE-2014-005
Database abstraction layer 
standard, vendor-agnostic abstraction layer for accessing database 
servers
Example: schema support in 
pgsql/schema.inc 
public function queryTableInformation($table) { 
// Generate a key to reference this table's information on. 
$key = $this->connection->prefixTables('{' . $table . '}'); 
if (!strpos($key, '.')) { 
$key = 'public.' . $key; 
} 
// ….
Database API & EFQ works with any 
DB
PostgreSQL driver problems 
1. MySQL
MySQL vs PostgreSQL Drupal 
benchmarks? 
Well-tuned MySQL is often quicker in synthetic tests. 
http://posulliv.github.io/2012/06/29/mysql-postgres-bench/ 
«Certainly, from a performance point of view, I see no 
issues with using PostgreSQL with Drupal. In fact, for 
Drupal sites using the Views module (probably the 
majority), I would say PostgreSQL is probably even a better 
option than MySQL due to its more advanced optimizer and 
execution engine.»
So, what’s next for you?
For Project Architect / Team Lead 
PostgreSQL is an open source level BDMS 
with huge amount of features. 
Consider PostgreSQL for quick start and 
continuous growth. 
It competes proprietary giants like Oracle 
DB and smells like Enterprise for your 
business.
For students / fellow developers 
PostgreSQL is a great choice if you’ve just 
finished your Database course. It respects 
standards and has a lot of cool features for 
your night time. 
As PostgreSQL market is full of highload 
projects and continuously grows.
For Drupal Developers 
Avoid MySQLisms. 
• db_query()/addExpression()/… 
• Use Database API in contribs 
• Learn new staff by contributing to both Drupal and 
Postgres 
• INSTALL IT ON DEV! It’s simple.
For PostgreSQL DBA 
• Drupal dislikes logic outside of itself. 
• Optimize queries and cache. 
• Integrate DB views with Drupal API.
PostgreSQL meets Drupal 
• http://planet.postgresql.org/ 
• http://www.meetup.com/postgresqlrussia/ 
• http://postgresmen.ru/articles/postgresql-users-russia- 
2014 
• http://prodrupal.ru/ru/node/129 
• https://www.drupal.org/node/555514 
• http://pgconf.ru/
sudo apt-get install postgresql 
by Kate Marshalkina 
marshalkina@licel.ru 
@kalabro

More Related Content

What's hot

Building a Mongo DSL in Scala at Hot Potato (Lincoln Hochberg)
Building a Mongo DSL in Scala at Hot Potato (Lincoln Hochberg)Building a Mongo DSL in Scala at Hot Potato (Lincoln Hochberg)
Building a Mongo DSL in Scala at Hot Potato (Lincoln Hochberg)MongoSF
 
SAP Open Source meetup/Speedment - Palo Alto 2015
SAP Open Source meetup/Speedment - Palo Alto 2015SAP Open Source meetup/Speedment - Palo Alto 2015
SAP Open Source meetup/Speedment - Palo Alto 2015
Speedment, Inc.
 
MongoDB on EC2 and EBS
MongoDB on EC2 and EBSMongoDB on EC2 and EBS
MongoDB on EC2 and EBS
Jared Rosoff
 
Presto+MySQLで分散SQL
Presto+MySQLで分散SQLPresto+MySQLで分散SQL
Presto+MySQLで分散SQL
Sadayuki Furuhashi
 
PyData London 2015 - How We Turned EverythingMe Into a Data Driven Company
PyData London 2015 - How We Turned EverythingMe Into a Data Driven CompanyPyData London 2015 - How We Turned EverythingMe Into a Data Driven Company
PyData London 2015 - How We Turned EverythingMe Into a Data Driven Company
Arik Fraimovich
 
What's up?
What's up?What's up?
Optimizing MongoDB: Lessons Learned at Localytics
Optimizing MongoDB: Lessons Learned at LocalyticsOptimizing MongoDB: Lessons Learned at Localytics
Optimizing MongoDB: Lessons Learned at Localytics
andrew311
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizing
Ashok Modi
 
Embulk and Machine Learning infrastructure
Embulk and Machine Learning infrastructureEmbulk and Machine Learning infrastructure
Embulk and Machine Learning infrastructure
Hiroshi Toyama
 
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
Ontico
 
PostgreSQL - масштабирование в моде, Valentine Gogichashvili (Zalando SE)
PostgreSQL - масштабирование в моде, Valentine Gogichashvili (Zalando SE)PostgreSQL - масштабирование в моде, Valentine Gogichashvili (Zalando SE)
PostgreSQL - масштабирование в моде, Valentine Gogichashvili (Zalando SE)
Ontico
 
What every developer should know about database scalability, PyCon 2010
What every developer should know about database scalability, PyCon 2010What every developer should know about database scalability, PyCon 2010
What every developer should know about database scalability, PyCon 2010jbellis
 
Running MongoDB 3.0 on AWS
Running MongoDB 3.0 on AWSRunning MongoDB 3.0 on AWS
Running MongoDB 3.0 on AWS
MongoDB
 
AEM WITH MONGODB
AEM WITH MONGODBAEM WITH MONGODB
AEM WITH MONGODB
Nate Nelson
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performance
Ashok Modi
 
MongoDB Capacity Planning
MongoDB Capacity PlanningMongoDB Capacity Planning
MongoDB Capacity Planning
Norberto Leite
 
Drupal, git and sanity
Drupal, git and sanityDrupal, git and sanity
Drupal, git and sanity
Charlie Morris
 
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...Making the case for write-optimized database algorithms / Mark Callaghan (Fac...
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...
Ontico
 
[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기
NAVER D2
 
Nosql taxonomy with new nugget
Nosql taxonomy with new nuggetNosql taxonomy with new nugget
Nosql taxonomy with new nuggetMatt Ingenthron
 

What's hot (20)

Building a Mongo DSL in Scala at Hot Potato (Lincoln Hochberg)
Building a Mongo DSL in Scala at Hot Potato (Lincoln Hochberg)Building a Mongo DSL in Scala at Hot Potato (Lincoln Hochberg)
Building a Mongo DSL in Scala at Hot Potato (Lincoln Hochberg)
 
SAP Open Source meetup/Speedment - Palo Alto 2015
SAP Open Source meetup/Speedment - Palo Alto 2015SAP Open Source meetup/Speedment - Palo Alto 2015
SAP Open Source meetup/Speedment - Palo Alto 2015
 
MongoDB on EC2 and EBS
MongoDB on EC2 and EBSMongoDB on EC2 and EBS
MongoDB on EC2 and EBS
 
Presto+MySQLで分散SQL
Presto+MySQLで分散SQLPresto+MySQLで分散SQL
Presto+MySQLで分散SQL
 
PyData London 2015 - How We Turned EverythingMe Into a Data Driven Company
PyData London 2015 - How We Turned EverythingMe Into a Data Driven CompanyPyData London 2015 - How We Turned EverythingMe Into a Data Driven Company
PyData London 2015 - How We Turned EverythingMe Into a Data Driven Company
 
What's up?
What's up?What's up?
What's up?
 
Optimizing MongoDB: Lessons Learned at Localytics
Optimizing MongoDB: Lessons Learned at LocalyticsOptimizing MongoDB: Lessons Learned at Localytics
Optimizing MongoDB: Lessons Learned at Localytics
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizing
 
Embulk and Machine Learning infrastructure
Embulk and Machine Learning infrastructureEmbulk and Machine Learning infrastructure
Embulk and Machine Learning infrastructure
 
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
 
PostgreSQL - масштабирование в моде, Valentine Gogichashvili (Zalando SE)
PostgreSQL - масштабирование в моде, Valentine Gogichashvili (Zalando SE)PostgreSQL - масштабирование в моде, Valentine Gogichashvili (Zalando SE)
PostgreSQL - масштабирование в моде, Valentine Gogichashvili (Zalando SE)
 
What every developer should know about database scalability, PyCon 2010
What every developer should know about database scalability, PyCon 2010What every developer should know about database scalability, PyCon 2010
What every developer should know about database scalability, PyCon 2010
 
Running MongoDB 3.0 on AWS
Running MongoDB 3.0 on AWSRunning MongoDB 3.0 on AWS
Running MongoDB 3.0 on AWS
 
AEM WITH MONGODB
AEM WITH MONGODBAEM WITH MONGODB
AEM WITH MONGODB
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performance
 
MongoDB Capacity Planning
MongoDB Capacity PlanningMongoDB Capacity Planning
MongoDB Capacity Planning
 
Drupal, git and sanity
Drupal, git and sanityDrupal, git and sanity
Drupal, git and sanity
 
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...Making the case for write-optimized database algorithms / Mark Callaghan (Fac...
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...
 
[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기
 
Nosql taxonomy with new nugget
Nosql taxonomy with new nuggetNosql taxonomy with new nugget
Nosql taxonomy with new nugget
 

Similar to Drupal meets PostgreSQL for DrupalCamp MSK 2014

Operating PostgreSQL at Scale with Kubernetes
Operating PostgreSQL at Scale with KubernetesOperating PostgreSQL at Scale with Kubernetes
Operating PostgreSQL at Scale with Kubernetes
Jonathan Katz
 
Whats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Whats wrong with postgres | PGConf EU 2019 | Craig KerstiensWhats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Whats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Citus Data
 
Lessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’tLessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’t
PGConf APAC
 
Useful PostgreSQL Extensions
Useful PostgreSQL ExtensionsUseful PostgreSQL Extensions
Useful PostgreSQL Extensions
EDB
 
pandas.(to/from)_sql is simple but not fast
pandas.(to/from)_sql is simple but not fastpandas.(to/from)_sql is simple but not fast
pandas.(to/from)_sql is simple but not fast
Uwe Korn
 
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
Teresa Giacomini
 
PostgreSQL as a Strategic Tool
PostgreSQL as a Strategic ToolPostgreSQL as a Strategic Tool
PostgreSQL as a Strategic Tool
EDB
 
Beyond Postgres: Interesting Projects, Tools and forks
Beyond Postgres: Interesting Projects, Tools and forksBeyond Postgres: Interesting Projects, Tools and forks
Beyond Postgres: Interesting Projects, Tools and forks
Sameer Kumar
 
Getting started with postgresql
Getting started with postgresqlGetting started with postgresql
Getting started with postgresql
botsplash.com
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharpSerdar Buyuktemiz
 
Migrating to postgresql
Migrating to postgresqlMigrating to postgresql
Migrating to postgresql
botsplash.com
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
 
PostgreSQL, your NoSQL database
PostgreSQL, your NoSQL databasePostgreSQL, your NoSQL database
PostgreSQL, your NoSQL database
Reuven Lerner
 
Postgres NoSQL - Delivering Apps Faster
Postgres NoSQL - Delivering Apps FasterPostgres NoSQL - Delivering Apps Faster
Postgres NoSQL - Delivering Apps Faster
EDB
 
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Gabriele Bartolini
 
How to build a PostgreSQL-backed website quickly
How to build a PostgreSQL-backed website quicklyHow to build a PostgreSQL-backed website quickly
How to build a PostgreSQL-backed website quickly
John Ashmead
 
PostgreSQL 9.4, 9.5 and Beyond @ COSCUP 2015 Taipei
PostgreSQL 9.4, 9.5 and Beyond @ COSCUP 2015 TaipeiPostgreSQL 9.4, 9.5 and Beyond @ COSCUP 2015 Taipei
PostgreSQL 9.4, 9.5 and Beyond @ COSCUP 2015 Taipei
Satoshi Nagayasu
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
Derek Jacoby
 
Rapid API Development ArangoDB Foxx
Rapid API Development ArangoDB FoxxRapid API Development ArangoDB Foxx
Rapid API Development ArangoDB FoxxMichael Hackstein
 
Databases in the Hosted Cloud
Databases in the Hosted CloudDatabases in the Hosted Cloud
Databases in the Hosted Cloud
Colin Charles
 

Similar to Drupal meets PostgreSQL for DrupalCamp MSK 2014 (20)

Operating PostgreSQL at Scale with Kubernetes
Operating PostgreSQL at Scale with KubernetesOperating PostgreSQL at Scale with Kubernetes
Operating PostgreSQL at Scale with Kubernetes
 
Whats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Whats wrong with postgres | PGConf EU 2019 | Craig KerstiensWhats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Whats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
 
Lessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’tLessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’t
 
Useful PostgreSQL Extensions
Useful PostgreSQL ExtensionsUseful PostgreSQL Extensions
Useful PostgreSQL Extensions
 
pandas.(to/from)_sql is simple but not fast
pandas.(to/from)_sql is simple but not fastpandas.(to/from)_sql is simple but not fast
pandas.(to/from)_sql is simple but not fast
 
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
PostgreSQL Extension APIs are Changing the Face of Relational Databases | PGC...
 
PostgreSQL as a Strategic Tool
PostgreSQL as a Strategic ToolPostgreSQL as a Strategic Tool
PostgreSQL as a Strategic Tool
 
Beyond Postgres: Interesting Projects, Tools and forks
Beyond Postgres: Interesting Projects, Tools and forksBeyond Postgres: Interesting Projects, Tools and forks
Beyond Postgres: Interesting Projects, Tools and forks
 
Getting started with postgresql
Getting started with postgresqlGetting started with postgresql
Getting started with postgresql
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharp
 
Migrating to postgresql
Migrating to postgresqlMigrating to postgresql
Migrating to postgresql
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
PostgreSQL, your NoSQL database
PostgreSQL, your NoSQL databasePostgreSQL, your NoSQL database
PostgreSQL, your NoSQL database
 
Postgres NoSQL - Delivering Apps Faster
Postgres NoSQL - Delivering Apps FasterPostgres NoSQL - Delivering Apps Faster
Postgres NoSQL - Delivering Apps Faster
 
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
 
How to build a PostgreSQL-backed website quickly
How to build a PostgreSQL-backed website quicklyHow to build a PostgreSQL-backed website quickly
How to build a PostgreSQL-backed website quickly
 
PostgreSQL 9.4, 9.5 and Beyond @ COSCUP 2015 Taipei
PostgreSQL 9.4, 9.5 and Beyond @ COSCUP 2015 TaipeiPostgreSQL 9.4, 9.5 and Beyond @ COSCUP 2015 Taipei
PostgreSQL 9.4, 9.5 and Beyond @ COSCUP 2015 Taipei
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
 
Rapid API Development ArangoDB Foxx
Rapid API Development ArangoDB FoxxRapid API Development ArangoDB Foxx
Rapid API Development ArangoDB Foxx
 
Databases in the Hosted Cloud
Databases in the Hosted CloudDatabases in the Hosted Cloud
Databases in the Hosted Cloud
 

More from Kate Marshalkina

Drupal 8: Теперь со вкусом Symfony
Drupal 8: Теперь со вкусом SymfonyDrupal 8: Теперь со вкусом Symfony
Drupal 8: Теперь со вкусом Symfony
Kate Marshalkina
 
Who is a Good Drupal Developer?
 Who is a Good Drupal Developer? Who is a Good Drupal Developer?
Who is a Good Drupal Developer?
Kate Marshalkina
 
Panels and Page Manager в Drupal 8
Panels and Page Manager в Drupal 8Panels and Page Manager в Drupal 8
Panels and Page Manager в Drupal 8
Kate Marshalkina
 
REST in Peace
REST in PeaceREST in Peace
REST in Peace
Kate Marshalkina
 
Drupalcon Amsterdam ‘14 for Symfoniacs
Drupalcon Amsterdam ‘14 for SymfoniacsDrupalcon Amsterdam ‘14 for Symfoniacs
Drupalcon Amsterdam ‘14 for Symfoniacs
Kate Marshalkina
 
Multilingual Drupal 8
Multilingual Drupal 8Multilingual Drupal 8
Multilingual Drupal 8
Kate Marshalkina
 

More from Kate Marshalkina (6)

Drupal 8: Теперь со вкусом Symfony
Drupal 8: Теперь со вкусом SymfonyDrupal 8: Теперь со вкусом Symfony
Drupal 8: Теперь со вкусом Symfony
 
Who is a Good Drupal Developer?
 Who is a Good Drupal Developer? Who is a Good Drupal Developer?
Who is a Good Drupal Developer?
 
Panels and Page Manager в Drupal 8
Panels and Page Manager в Drupal 8Panels and Page Manager в Drupal 8
Panels and Page Manager в Drupal 8
 
REST in Peace
REST in PeaceREST in Peace
REST in Peace
 
Drupalcon Amsterdam ‘14 for Symfoniacs
Drupalcon Amsterdam ‘14 for SymfoniacsDrupalcon Amsterdam ‘14 for Symfoniacs
Drupalcon Amsterdam ‘14 for Symfoniacs
 
Multilingual Drupal 8
Multilingual Drupal 8Multilingual Drupal 8
Multilingual Drupal 8
 

Recently uploaded

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 

Recently uploaded (20)

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 

Drupal meets PostgreSQL for DrupalCamp MSK 2014

  • 1. PostgreSQL Bye, the dolphin. Hello, the elephant. Kate Marshalkina marshalkina@licel.ru @kalabro
  • 3. Faster, better, stronger • PostgreSQL 100500x faster that MySQL and Oracle DB • 200k times more reliable • 13 times more secure • 221 times cheaper • ...∞
  • 4. Faster, better, stronger • PostgreSQL 100500x faster that MySQL and Oracle DB • 200k times more reliable • 13 times more secure ??? • 221 times cheaper • ...∞ Well, I don’t know.
  • 5. > whoami Kate Marshalkina, Senior Web Developer (not a DBA!) 6 year of PHP, 3 years 4 months * with Drupal + Postgres https://www.drupal.org/u/kalabro and @kalabro marshalkina@licel.ru * According to Drupal.org. 5 years 27 weeks according to Drupal.ru.
  • 6. Agenda • About PostgreSQL • Install Drupal + PostgreSQL • Discover why it works (Drupal DBAL) • The most important slide #3 • Who you are in Drupal dev world and what to do with it? • Links
  • 8. PostgreSQL • Object-relational • True open source • Follows standards (ANSI-SQL, ACID) • MVCC • Sophisticated query planner/optimizer • Replication
  • 9. PostgreSQL (advanced) • Inherited tables • Huge amount of build-in data types + custom types • Advanced indexes (compound, unique, partial, functional) • Stored procedures • Full text search (FTS) • JSON(B) • Extensions (hstore, PostGIS, dblink, …) http://www.postgresql.org/docs/9.3/static/contrib.html
  • 10. PostgreSQL Feature Matrix http://www.postgresql.org/about/featurematrix/
  • 11. Latest stable: 9.3 9.4 RC1 released
  • 12. JSON? Simple Key=Value (hstore) supported since 8.3 Full JSON (jsonb) with indexes — in PostgreSQL 9.4! Thanks to dev team: Олег Бартунов, Александр Коротков, Федор Сигаев
  • 13. PostgreSQL grows fast http://momjian.us/main/blogs/pgblog/2014.html#November_11_2014
  • 14. Install PostgreSQL + Drupal 1. Install Postgres The most difficult part: pg_hba.conf 2. Run pgtune (optionally) 3. Install php5-pgsql 4. Install Drupal
  • 15.
  • 16. Manage PostgreSQL CLI: psql UI: pgAdmin, phppgadmin
  • 17. First time vocabulary • User postgres sudo -u postgres psql • Templates for databases • Schema • Autovacuum • ~/.pgpass
  • 18.
  • 20. Database abstraction layer standard, vendor-agnostic abstraction layer for accessing database servers
  • 21. Example: schema support in pgsql/schema.inc public function queryTableInformation($table) { // Generate a key to reference this table's information on. $key = $this->connection->prefixTables('{' . $table . '}'); if (!strpos($key, '.')) { $key = 'public.' . $key; } // ….
  • 22. Database API & EFQ works with any DB
  • 24.
  • 25. MySQL vs PostgreSQL Drupal benchmarks? Well-tuned MySQL is often quicker in synthetic tests. http://posulliv.github.io/2012/06/29/mysql-postgres-bench/ «Certainly, from a performance point of view, I see no issues with using PostgreSQL with Drupal. In fact, for Drupal sites using the Views module (probably the majority), I would say PostgreSQL is probably even a better option than MySQL due to its more advanced optimizer and execution engine.»
  • 26. So, what’s next for you?
  • 27. For Project Architect / Team Lead PostgreSQL is an open source level BDMS with huge amount of features. Consider PostgreSQL for quick start and continuous growth. It competes proprietary giants like Oracle DB and smells like Enterprise for your business.
  • 28. For students / fellow developers PostgreSQL is a great choice if you’ve just finished your Database course. It respects standards and has a lot of cool features for your night time. As PostgreSQL market is full of highload projects and continuously grows.
  • 29. For Drupal Developers Avoid MySQLisms. • db_query()/addExpression()/… • Use Database API in contribs • Learn new staff by contributing to both Drupal and Postgres • INSTALL IT ON DEV! It’s simple.
  • 30. For PostgreSQL DBA • Drupal dislikes logic outside of itself. • Optimize queries and cache. • Integrate DB views with Drupal API.
  • 31. PostgreSQL meets Drupal • http://planet.postgresql.org/ • http://www.meetup.com/postgresqlrussia/ • http://postgresmen.ru/articles/postgresql-users-russia- 2014 • http://prodrupal.ru/ru/node/129 • https://www.drupal.org/node/555514 • http://pgconf.ru/
  • 32. sudo apt-get install postgresql by Kate Marshalkina marshalkina@licel.ru @kalabro