SlideShare a Scribd company logo
1 of 96
Pro PostgreSQL Robert Treat omniti.com brighterlamp.org
Who Am I?  (Why Listen To Me) A-0 ,[object Object],[object Object],[object Object],[object Object],[object Object]
Outline A-1 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],http://pgfoundry.org/projects/dbsamples/
C-0 Get Off To A Good Start
C-1 Get Off To A Good Start Use package management ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],C-2 Get Off To A Good Start Use package management
[object Object],[object Object],[object Object],C-3 Get Off To A Good Start Use package management Don't Be Afraid To Roll Your Own
C-4 Get Off To A Good Start ,[object Object],[object Object],[object Object],Configure Logging Logging is often overlooked,  but is the first step toward troubleshooting!
C-5 Get Off To A Good Start ,[object Object],[object Object],[object Object],Configure Authentication
C-6 Get Off To A Good Start ,[object Object],[object Object],[object Object],Authentication Methods
C-7 Get Off To A Good Start ,[object Object],[object Object],[object Object],[object Object],[object Object],/contrib
C-8 Get Off To A Good Start ,[object Object],[object Object],[object Object],[object Object],[object Object],procedural languages
D-0 Let's Talk About Upgrades
D-1 Let's Talk About Upgrades Versioning First Digit ( 7 .4.16 ->  8 .2.0) Second Digit (8.2.4 -> 8.3.0) Third Digit (8.3.0 -> 8.3.1)
D-2 Let's Talk About Upgrades Versioning First Digit (7.4.16 -> 8.2.0) Second Digit (8. 2 .4 -> 8. 3 .0) Third Digit (8.3.0 -> 8.3.1)
D-3 Let's Talk About Upgrades Versioning First Digit (7.4.16 -> 8.2.0) Second Digit (8.2.4 -> 8.3.0) Third Digit (8.3. 0  -> 8.3. 1 )
D-4 Let's Talk About Upgrades Achtung!! ,[object Object],[object Object]
D-5 Let's Talk About Upgrades pg_dump/pg_restore ,[object Object],[object Object],[object Object],[object Object]
D-6 Let's Talk About Upgrades the slony method ,[object Object],[object Object],[object Object],[object Object]
D-7 Let's Talk About Upgrades pg_migrator ,[object Object],[object Object],[object Object],[object Object],[object Object]
D-8 Let's Talk About Upgrades upgrading older db ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
E-0 Figure Your Configure
E-1 Figure Your Configure the basics : performance ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
E-2 Figure Your Configure the basics : logging ,[object Object],[object Object],[object Object],[object Object]
E-5 Figure Your Configure other stuff worth looking at ,[object Object],[object Object],[object Object],[object Object]
P-0 Routine Maintenance
P-1 Routine Maintenance a word about vacuum ,[object Object],[object Object],[object Object]
P-2 Routine Maintenance autovacuum : just do it! ,[object Object],[object Object],[object Object],[object Object]
P-3 Routine Maintenance other stuff worth looking at ,[object Object],[object Object],[object Object],[object Object]
G-0 Availability
G-1 Availability what do we mean by availability? ,[object Object],[object Object],[object Object]
G-2 Availability what do we mean by availability? if (kablooy) then (ok) ,[object Object],[object Object],[object Object]
G-3 Availability pg_dump ,[object Object],[object Object],[object Object],[object Object]
G-4 Availability pitr ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
G-5 Availability slony ,[object Object],[object Object],[object Object],[object Object]
G-5 Availability bucardo ,[object Object],[object Object],[object Object],[object Object]
G-6 Availability shared disk ,[object Object],[object Object],[object Object],[object Object]
G-7 Availability filesystem replication ,[object Object],[object Object],[object Object],[object Object]
G-8 Availability pgpool ,[object Object],[object Object],[object Object],[object Object]
I-0 Beyond Simple SQL
I-1 Beyond Simple SQL generate series pagila=# select * from generate_series(1,3); generate_series ----------------- 1 2 3 (3 rows) ,[object Object]
I-2 Beyond Simple SQL generate series ,[object Object],pagila=# select '2007-05-22 09:00:00'::timestamp - x * '1 hour'::interval as countdown  from generate_series(1,10) x; countdown --------------------- 2007-05-22 08:00:00 2007-05-22 07:00:00 2007-05-22 06:00:00 2007-05-22 05:00:00 2007-05-22 04:00:00 2007-05-22 03:00:00 2007-05-22 02:00:00 2007-05-22 01:00:00 2007-05-22 00:00:00 2007-05-21 23:00:00 (10 rows)
I-3 Beyond Simple SQL rownum()
I-4 Beyond Simple SQL row numbering
I-5 Beyond Simple SQL row numbering pagila=# select  (select count(*)+1 from customer where customer_id < x.customer_id)  as rownum, customer_id, first_name, last_name  from customer x limit 5; rownum | customer_id | first_name | last_name --------+-------------+------------+----------- 1 |  1 | MARY  | SMITH 2 |  3 | LINDA  | WILLIAMS 3 |  4 | BARBARA  | JONES 4 |  5 | ELIZABETH  | BROWN 5 |  6 | JENNIFER  | DAVIS (5 rows)
I-6 Beyond Simple SQL row numbering pagila=# select  (select count(*)+1 from customer where customer_id < x.customer_id)   as rownum, customer_id, first_name, last_name  from customer x limit 5; rownum | customer_id | first_name | last_name --------+-------------+------------+----------- 1 |  1 | MARY  | SMITH 2 |  3 | LINDA  | WILLIAMS 3 |  4 | BARBARA  | JONES 4 |  5 | ELIZABETH  | BROWN 5 |  6 | JENNIFER  | DAVIS (5 rows)
I-7 Beyond Simple SQL row numbering pagila=# select  (select count(*)+1 from customer where customer_id < x.customer_id)  as rownum, customer_id, first_name, last_name  from customer x limit 5; rownum | customer_id | first_name | last_name --------+-------------+------------+----------- 1  |  1  | MARY  | SMITH 2  |  3  | LINDA  | WILLIAMS 3  |  4  | BARBARA  | JONES 4 |  5 | ELIZABETH  | BROWN 5 |  6 | JENNIFER  | DAVIS (5 rows) ,[object Object]
I-8 Beyond Simple SQL row numbering ,[object Object],pagila=# select  (select count(*)+1 from customer where last_name < x.last_name)   as rownum, first_name, last_name  from customer x  order by last_name  limit 5; rownum | first_name | last_name --------+------------+----------- 1 | RAFAEL  | ABNEY 2 | NATHANIEL  | ADAM 3 | KATHLEEN  | ADAMS 4 | DIANA  | ALEXANDER 5 | GORDON  | ALLARD (5 rows)
I-9 Beyond Simple SQL rollup() pagila=# select customer_id, amount from payment limit 10; customer_id | amount -------------+-------- 267 |  7.98 267 |  0.00 269 |  3.98 269 |  0.00 274 |  0.99 279 |  4.99 282 |  0.99 284 |  5.98 284 |  0.00 287 |  0.99 (10 rows)
I-10 Beyond Simple SQL rollup() pagila=# select customer_id, amount, total from payment JOIN  (select customer_id, sum(amount) as total from payment group by customer_id)  x using (customer_id)  limit 10; customer_id | amount | total -------------+--------+-------- 267 |  7.98 | 159.64 267 |  0.00 | 159.64 269 |  3.98 | 129.70 269 |  0.00 | 129.70 274 |  0.99 | 152.65 279 |  4.99 | 135.69 282 |  0.99 | 103.73 284 |  5.98 | 126.72 284 |  0.00 | 126.72 287 |  0.99 | 115.71 (10 rows) ,[object Object]
I-11 Beyond Simple SQL rank() SELECT * FROM (select c1.first_name, c1.last_name, c1.store_id, p1.total, (select 1 + count(*) from customer c2 join (select  customer_id, sum(amount) as total from only payment group by  customer_id) p2 using (customer_id) where c2.store_id = c1.store_id  and p2.total > p1.total) as rank from customer c1 join (select  customer_id, sum(amount) as total from only payment group by  customer_id) p1 using (customer_id) ) x WHERE x.rank <= 3 ORDER BY  x.store_id, x.rank; first_name | last_name | store_id | total  | rank ------------+-----------+----------+--------+------ ELEANOR  | HUNT  |  1 | 216.54 |  1 CLARA  | SHAW  |  1 | 195.58 |  2 TOMMY  | COLLAZO  |  1 | 186.62 |  3 KARL  | SEAL  |  2 | 221.55 |  1 MARION  | SNYDER  |  2 | 194.61 |  2 RHONDA  | KENNEDY  |  2 | 194.61 |  2 (6 rows)
I-12 Beyond Simple SQL SELECT * FROM  (SELECT  c1.first_name, c1.last_name, c1.store_id, p1.total,  (SELECT  1 + count(*)  FROM  customer c2  JOIN  (SELECT customer_id, sum(amount) AS total FROM    payment GROUP BY customer_id) p2 USING (customer_id)  WHERE  c2.store_id = c1.store_id  AND  p2.total > p1.total ) AS rank  FROM  customer c1  JOIN (SELECT customer_id, sum(amount) AS total FROM payment  GROUP BY customer_id) p1 USING (customer_id)  ) x  WHERE  x.rank <= 3  ORDER BY  x.store_id, x.rank;
I-13 Beyond Simple SQL SELECT * FROM   (SELECT  c1.first_name, c1.last_name, c1.store_id, p1.total,  (SELECT  1 + count(*)  FROM  customer c2  JOIN  (SELECT customer_id, sum(amount) AS total FROM    payment GROUP BY customer_id) p2 USING (customer_id)   WHERE  c2.store_id = c1.store_id  AND  p2.total > p1.total ) AS rank  FROM  customer c1  JOIN (SELECT customer_id, sum(amount) AS total FROM payment  GROUP BY customer_id) p1 USING (customer_id)  ) x  WHERE  x.rank <= 3  ORDER BY  x.store_id, x.rank;
I-14 Beyond Simple SQL SELECT * FROM   (SELECT  c1.first_name, c1.last_name, c1.store_id, p1.total,   (SELECT  1 + count(*)  FROM  customer c2  JOIN  (SELECT customer_id, sum(amount) AS total FROM    payment GROUP BY customer_id) p2 USING (customer_id)  WHERE  c2.store_id = c1.store_id  AND  p2.total > p1.total ) AS rank  FROM  customer c1  JOIN (SELECT customer_id, sum(amount) AS total FROM payment  GROUP BY customer_id) p1 USING (customer_id)  ) x  WHERE  x.rank <= 3  ORDER BY  x.store_id, x.rank;
I-15 Beyond Simple SQL SELECT * FROM   (SELECT  c1.first_name, c1.last_name, c1.store_id, p1.total,  (SELECT  1 + count(*)  FROM  customer c2  JOIN  (SELECT customer_id, sum(amount) AS total FROM    payment GROUP BY customer_id) p2 USING (customer_id)  WHERE  c2.store_id = c1.store_id  AND  p2.total > p1.total ) AS rank  FROM  customer c1  JOIN (SELECT customer_id, sum(amount) AS total FROM payment  GROUP BY customer_id) p1 USING (customer_id)  ) x   WHERE  x.rank <= 3  ORDER BY  x.store_id, x.rank;
I-16 Beyond Simple SQL SELECT * FROM  (SELECT  c1.first_name, c1.last_name, c1.store_id, p1.total,  (SELECT  1 + count(*)  FROM  customer c2  JOIN  (SELECT customer_id, sum(amount) AS total FROM    payment GROUP BY customer_id) p2 USING (customer_id)  WHERE  c2.store_id = c1.store_id  AND  p2.total > p1.total ) AS rank   FROM  customer c1  JOIN (SELECT customer_id, sum(amount) AS total FROM payment  GROUP BY customer_id) p1 USING (customer_id)  ) x  WHERE  x.rank <= 3  ORDER BY  x.store_id, x.rank;
J-0 Query Your Queries
J-1 Query Your Queries finding slow queries: log_min_duration_statement ,[object Object],[object Object],[object Object],LOG:  duration: 5005.273 ms  statement: select pg_sleep(5);
J-2 Query Your Queries finding slow queries: pgfouine / pqa ,[object Object],[object Object],[object Object],http://pgfouine.projects.postgresql.org/reports.html http://pqa.projects.postgresql.org/example.html
J-3 Query Your Queries finding slow queries: pg_stat_all_tables pagila=#  pg_stat_all_tables View &quot;pg_catalog.pg_stat_all_tables&quot; Column  |  Type  | ----------------+-------------------------- relid  | oid  | schemaname  | name  | relname  | name  | seq_scan  | bigint  | seq_tup_read  | bigint  | idx_scan  | bigint  | idx_tup_fetch  | bigint  | n_tup_ins  | bigint  | n_tup_upd  | bigint  | n_tup_del  | bigint  |
J-4 Query Your Queries finding slow queries: pg_stat_all_tables pagila=#  pg_stat_all_tables View &quot;pg_catalog.pg_stat_all_tables&quot; Column  |  Type  | ----------------+-------------------------- relid  | oid  | schemaname  | name  | relname  | name  | seq_scan  | bigint  | seq_tup_read  | bigint  | idx_scan  | bigint  | idx_tup_fetch  | bigint  | n_tup_ins  | bigint  | n_tup_upd  | bigint  | n_tup_del  | bigint  |
J-5 Query Your Queries finding slow queries: pg_stat_all_tables pagila=#  pg_stat_all_tables View &quot;pg_catalog.pg_stat_all_tables&quot; Column  |  Type  | ----------------+-------------------------- relid  | oid  | schemaname  | name  | relname  | name  | seq_scan  | bigint  | seq_tup_read  | bigint  | idx_scan  | bigint  | idx_tup_fetch  | bigint  | n_tup_ins  | bigint  | n_tup_upd  | bigint  | n_tup_del  | bigint  |
J-6 Query Your Queries finding slow queries: pg_stat_all_tables pagila=#  pg_stat_all_tables View &quot;pg_catalog.pg_stat_all_tables&quot; Column  |  Type  | ----------------+-------------------------- relid  | oid  | schemaname  | name  | relname  | name  | seq_scan  | bigint  | seq_tup_read  | bigint  | idx_scan  | bigint  | idx_tup_fetch  | bigint  | n_tup_ins  | bigint  | n_tup_upd  | bigint  | n_tup_del  | bigint  |
J-7 Query Your Queries finding slow queries: pg_stat_all_indexes pagila=#  pg_stat_all_indexes View &quot;pg_catalog.pg_stat_all_indexes&quot; Column  |  Type  | ---------------+--------+ relid  | oid  | indexrelid  | oid  | schemaname  | name  | relname  | name  | indexrelname  | name  | idx_scan  | bigint | idx_tup_read  | bigint | idx_tup_fetch | bigint |
J-8 Query Your Queries finding slow queries: pg_stat_all_indexes pagila=#  pg_stat_all_indexes View &quot;pg_catalog.pg_stat_all_indexes&quot; Column  |  Type  | ---------------+--------+ relid  | oid  | indexrelid  | oid  | schemaname  | name  | relname  | name  | indexrelname  | name  | idx_scan  | bigint | idx_tup_read  | bigint | idx_tup_fetch | bigint |
J-9 Query Your Queries finding slow queries: pg_statio_all_tables pagila=#  pg_statio_all_tables View &quot;pg_catalog.pg_statio_all_tables&quot; Column  |  Type  | -----------------+--------+ relid  | oid  | schemaname  | name  | relname  | name  | heap_blks_read  | bigint | heap_blks_hit  | bigint | idx_blks_read  | bigint | idx_blks_hit  | bigint | toast_blks_read | bigint | toast_blks_hit  | bigint | tidx_blks_read  | bigint | tidx_blks_hit  | bigint |
J-9 Query Your Queries finding slow queries: pg_statio_all_tables pagila=#  pg_statio_all_tables View &quot;pg_catalog.pg_statio_all_tables&quot; Column  |  Type  | -----------------+--------+ relid  | oid  | schemaname  | name  | relname  | name  | heap_blks_read  | bigint | heap_blks_hit  | bigint | idx_blks_read  | bigint | idx_blks_hit  | bigint | toast_blks_read | bigint | toast_blks_hit  | bigint | tidx_blks_read  | bigint | tidx_blks_hit  | bigint |
J-10 Query Your Queries fixing slow queries: explain analyze ,[object Object],[object Object],[object Object],[object Object]
J-11 Query Your Queries fixing slow queries: explain analyze ,[object Object],[object Object],[object Object],[object Object],http://www.postgresql.org/docs/techdocs.38
L-0 Indexing Options
L-1 Indexing Options indexing (basic) ,[object Object],[object Object],[object Object],[object Object],[object Object]
L-2 Indexing Options indexing (partial) create index address_ba_part_idx  on address (district)  where district = 'Buenos Aires'; ,[object Object],[object Object],[object Object],[object Object]
L-3 Indexing Options indexing (partial) create index customer_active_part_idx  on customer (customer_id)  where activebool is true; ,[object Object],[object Object],[object Object],[object Object]
L-4 Indexing Options indexing (functional) ,[object Object]
L-5 Indexing Options indexing (expressional) create unique index one_true_email_xidx on customer (lower(email)); ,[object Object],[object Object],[object Object],[object Object]
L-6 Indexing Options indexing (expressional) create index fullname_xidx on customer ((first_name||' '||last_name)); ,[object Object],[object Object],[object Object],[object Object]
L-7 Indexing Options full text indexing gist vs. gin ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
N-0 PostgreSQL Tablespaces
N-1 PostgreSQL Tablespaces tablespaces? ,[object Object],[object Object],[object Object],[object Object]
N-2 PostgreSQL Tablespaces tablespaces! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Q-0 PostgreSQL Partitioning
Q-1 PostgreSQL Partitioning partitioning? ,[object Object],[object Object],[object Object],[object Object]
Q-2 PostgreSQL Partitioning partitioning! ,[object Object],[object Object],[object Object],[object Object],http://www.pgcon.org/2007/schedule/events/41.en.html
Q-3 PostgreSQL Partitioning partitioning : key points ,[object Object],[object Object],[object Object],[object Object]
K-0 Other Stuff I Should Mention
K-1 Other Stuff I Should Mention tsearch2 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
K-2 Other Stuff I Should Mention pgcrypto ,[object Object],[object Object],[object Object]
K-3 Other Stuff I Should Mention dblink ,[object Object],[object Object],[object Object],[object Object],[object Object]
K-4 Other Stuff I Should Mention autonomous logging tool ,[object Object],[object Object],[object Object],https://labs.omniti.com/trac/pgsoltools
K-4 Other Stuff I Should Mention snapshot pitr clones ,[object Object],[object Object],[object Object],https://labs.omniti.com/trac/pgsoltools
K-4 Other Stuff I Should Mention pgbouncer ,[object Object],[object Object],[object Object],https://developer.skype.com/SkypeGarage/DbProjects/PgBouncer
K-5 Other Stuff I Should Mention dbi-link ,[object Object],[object Object],[object Object],[object Object],http://pgfoundry.org/projects/dbi-link/
K-6 Other Stuff I Should Mention phppgadmin ,[object Object],[object Object],[object Object],[object Object],http://phppgadmin.sourceforge.net/
K-7 Other Stuff I Should Mention  ;-) my book?
K-8 Other Stuff I Should Mention  ;-) we're hiring ,[object Object],[object Object],[object Object],http://www.omniti.com/people/jobs
X-0 El Fin

More Related Content

What's hot

2018 db-rainer schuettengruber-beating-oracles_optimizer_at_its_own_game-pres...
2018 db-rainer schuettengruber-beating-oracles_optimizer_at_its_own_game-pres...2018 db-rainer schuettengruber-beating-oracles_optimizer_at_its_own_game-pres...
2018 db-rainer schuettengruber-beating-oracles_optimizer_at_its_own_game-pres...Rainer Schuettengruber
 
Character Encoding - MySQL DevRoom - FOSDEM 2015
Character Encoding - MySQL DevRoom - FOSDEM 2015Character Encoding - MySQL DevRoom - FOSDEM 2015
Character Encoding - MySQL DevRoom - FOSDEM 2015mushupl
 
New features in Performance Schema 5.7 in action
New features in Performance Schema 5.7 in actionNew features in Performance Schema 5.7 in action
New features in Performance Schema 5.7 in actionSveta Smirnova
 
MySQL Query tuning 101
MySQL Query tuning 101MySQL Query tuning 101
MySQL Query tuning 101Sveta Smirnova
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingSveta Smirnova
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingSveta Smirnova
 
My SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTNMy SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTNRonald Bradford
 
Redo logfile addition in oracle rac 12c
Redo logfile addition in oracle rac 12cRedo logfile addition in oracle rac 12c
Redo logfile addition in oracle rac 12cDebasish Nayak
 
New Features of SQL Server 2016
New Features of SQL Server 2016New Features of SQL Server 2016
New Features of SQL Server 2016Mir Mahmood
 
Why Use EXPLAIN FORMAT=JSON?
 Why Use EXPLAIN FORMAT=JSON?  Why Use EXPLAIN FORMAT=JSON?
Why Use EXPLAIN FORMAT=JSON? Sveta Smirnova
 
Moving to the NoSQL side: MySQL JSON functions
 Moving to the NoSQL side: MySQL JSON functions Moving to the NoSQL side: MySQL JSON functions
Moving to the NoSQL side: MySQL JSON functionsSveta Smirnova
 
Linux networking commands short
Linux networking commands shortLinux networking commands short
Linux networking commands shortSayed Ahmed
 
Quick reference for mongo shell commands
Quick reference for mongo shell commandsQuick reference for mongo shell commands
Quick reference for mongo shell commandsRajkumar Asohan, PMP
 
Performance Schema for MySQL Troubleshooting
 Performance Schema for MySQL Troubleshooting Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingSveta Smirnova
 
Stack It And Unpack It
Stack It And Unpack ItStack It And Unpack It
Stack It And Unpack ItJeff Moss
 
Riyaj: why optimizer_hates_my_sql_2010
Riyaj: why optimizer_hates_my_sql_2010Riyaj: why optimizer_hates_my_sql_2010
Riyaj: why optimizer_hates_my_sql_2010Riyaj Shamsudeen
 
MySQL partitions tutorial
MySQL partitions tutorialMySQL partitions tutorial
MySQL partitions tutorialGiuseppe Maxia
 

What's hot (20)

2018 db-rainer schuettengruber-beating-oracles_optimizer_at_its_own_game-pres...
2018 db-rainer schuettengruber-beating-oracles_optimizer_at_its_own_game-pres...2018 db-rainer schuettengruber-beating-oracles_optimizer_at_its_own_game-pres...
2018 db-rainer schuettengruber-beating-oracles_optimizer_at_its_own_game-pres...
 
Character Encoding - MySQL DevRoom - FOSDEM 2015
Character Encoding - MySQL DevRoom - FOSDEM 2015Character Encoding - MySQL DevRoom - FOSDEM 2015
Character Encoding - MySQL DevRoom - FOSDEM 2015
 
New features in Performance Schema 5.7 in action
New features in Performance Schema 5.7 in actionNew features in Performance Schema 5.7 in action
New features in Performance Schema 5.7 in action
 
MySQL Query tuning 101
MySQL Query tuning 101MySQL Query tuning 101
MySQL Query tuning 101
 
Oracle 11g caracteristicas poco documentadas 3 en 1
Oracle 11g caracteristicas poco documentadas 3 en 1Oracle 11g caracteristicas poco documentadas 3 en 1
Oracle 11g caracteristicas poco documentadas 3 en 1
 
Les09
Les09Les09
Les09
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
 
My SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTNMy SQL Idiosyncrasies That Bite OTN
My SQL Idiosyncrasies That Bite OTN
 
Redo logfile addition in oracle rac 12c
Redo logfile addition in oracle rac 12cRedo logfile addition in oracle rac 12c
Redo logfile addition in oracle rac 12c
 
New Features of SQL Server 2016
New Features of SQL Server 2016New Features of SQL Server 2016
New Features of SQL Server 2016
 
Why Use EXPLAIN FORMAT=JSON?
 Why Use EXPLAIN FORMAT=JSON?  Why Use EXPLAIN FORMAT=JSON?
Why Use EXPLAIN FORMAT=JSON?
 
Moving to the NoSQL side: MySQL JSON functions
 Moving to the NoSQL side: MySQL JSON functions Moving to the NoSQL side: MySQL JSON functions
Moving to the NoSQL side: MySQL JSON functions
 
Linux networking commands short
Linux networking commands shortLinux networking commands short
Linux networking commands short
 
Quick reference for mongo shell commands
Quick reference for mongo shell commandsQuick reference for mongo shell commands
Quick reference for mongo shell commands
 
Dbmsmanual
DbmsmanualDbmsmanual
Dbmsmanual
 
Performance Schema for MySQL Troubleshooting
 Performance Schema for MySQL Troubleshooting Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
 
Stack It And Unpack It
Stack It And Unpack ItStack It And Unpack It
Stack It And Unpack It
 
Riyaj: why optimizer_hates_my_sql_2010
Riyaj: why optimizer_hates_my_sql_2010Riyaj: why optimizer_hates_my_sql_2010
Riyaj: why optimizer_hates_my_sql_2010
 
MySQL partitions tutorial
MySQL partitions tutorialMySQL partitions tutorial
MySQL partitions tutorial
 

Viewers also liked

Balance & Opportunity in East Devonport Urban Renovation
Balance & Opportunity in East Devonport Urban RenovationBalance & Opportunity in East Devonport Urban Renovation
Balance & Opportunity in East Devonport Urban RenovationJohn Latham
 
Ellis Whittam Brochure
Ellis Whittam BrochureEllis Whittam Brochure
Ellis Whittam BrochureEllisWhittam
 
How to keep teeth healthy by Alison Dadow
How to keep teeth healthy by Alison DadowHow to keep teeth healthy by Alison Dadow
How to keep teeth healthy by Alison DadowAlison Dadow
 
El color de las piedras precisosa jhonathan charry
El color de las piedras precisosa jhonathan charryEl color de las piedras precisosa jhonathan charry
El color de las piedras precisosa jhonathan charryJhonatan Charry
 
Cleft lip and cleft palate
Cleft lip and cleft palateCleft lip and cleft palate
Cleft lip and cleft palatelingampelli
 
LKS Fisika : Praktikum Lensa Cembung
LKS Fisika : Praktikum Lensa CembungLKS Fisika : Praktikum Lensa Cembung
LKS Fisika : Praktikum Lensa CembungAmphie Yuurisman
 

Viewers also liked (10)

motion detection
motion detection motion detection
motion detection
 
Balance & Opportunity in East Devonport Urban Renovation
Balance & Opportunity in East Devonport Urban RenovationBalance & Opportunity in East Devonport Urban Renovation
Balance & Opportunity in East Devonport Urban Renovation
 
Guia enseñanza taller 1
Guia enseñanza taller 1Guia enseñanza taller 1
Guia enseñanza taller 1
 
Human Gyroscope Rides
Human Gyroscope RidesHuman Gyroscope Rides
Human Gyroscope Rides
 
Ellis Whittam Brochure
Ellis Whittam BrochureEllis Whittam Brochure
Ellis Whittam Brochure
 
How to keep teeth healthy by Alison Dadow
How to keep teeth healthy by Alison DadowHow to keep teeth healthy by Alison Dadow
How to keep teeth healthy by Alison Dadow
 
El color de las piedras precisosa jhonathan charry
El color de las piedras precisosa jhonathan charryEl color de las piedras precisosa jhonathan charry
El color de las piedras precisosa jhonathan charry
 
Secondary Progressive Multiple Sclerosis
Secondary Progressive Multiple SclerosisSecondary Progressive Multiple Sclerosis
Secondary Progressive Multiple Sclerosis
 
Cleft lip and cleft palate
Cleft lip and cleft palateCleft lip and cleft palate
Cleft lip and cleft palate
 
LKS Fisika : Praktikum Lensa Cembung
LKS Fisika : Praktikum Lensa CembungLKS Fisika : Praktikum Lensa Cembung
LKS Fisika : Praktikum Lensa Cembung
 

Similar to Pro PostgreSQL

PostgreSQL 8.4 TriLUG 2009-11-12
PostgreSQL 8.4 TriLUG 2009-11-12PostgreSQL 8.4 TriLUG 2009-11-12
PostgreSQL 8.4 TriLUG 2009-11-12Andrew Dunstan
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012Roland Bouman
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012Roland Bouman
 
My sql 5.7-upcoming-changes-v2
My sql 5.7-upcoming-changes-v2My sql 5.7-upcoming-changes-v2
My sql 5.7-upcoming-changes-v2Morgan Tocker
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLCommand Prompt., Inc
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLMark Wong
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLCommand Prompt., Inc
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLMark Wong
 
MySQL 5.7. Tutorial - Dutch PHP Conference 2015
MySQL 5.7. Tutorial - Dutch PHP Conference 2015MySQL 5.7. Tutorial - Dutch PHP Conference 2015
MySQL 5.7. Tutorial - Dutch PHP Conference 2015Dave Stokes
 
MySQL 5.7 Tutorial Dutch PHP Conference 2015
MySQL 5.7 Tutorial Dutch PHP Conference 2015MySQL 5.7 Tutorial Dutch PHP Conference 2015
MySQL 5.7 Tutorial Dutch PHP Conference 2015Dave Stokes
 
11 Things About11g
11 Things About11g11 Things About11g
11 Things About11gfcamachob
 
11thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp0111thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp01Karam Abuataya
 
Oracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor formatOracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor formatFranck Pachot
 
Short Intro to PHP and MySQL
Short Intro to PHP and MySQLShort Intro to PHP and MySQL
Short Intro to PHP and MySQLJussi Pohjolainen
 
Window functions in MySQL 8.0
Window functions in MySQL 8.0Window functions in MySQL 8.0
Window functions in MySQL 8.0Mydbops
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLMark Wong
 
MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)
MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)
MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)Valeriy Kravchuk
 
Introduction to Parallel Execution
Introduction to Parallel ExecutionIntroduction to Parallel Execution
Introduction to Parallel ExecutionDoug Burns
 

Similar to Pro PostgreSQL (20)

PostgreSQL 8.4 TriLUG 2009-11-12
PostgreSQL 8.4 TriLUG 2009-11-12PostgreSQL 8.4 TriLUG 2009-11-12
PostgreSQL 8.4 TriLUG 2009-11-12
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
 
Common schema my sql uc 2012
Common schema   my sql uc 2012Common schema   my sql uc 2012
Common schema my sql uc 2012
 
My sql 5.7-upcoming-changes-v2
My sql 5.7-upcoming-changes-v2My sql 5.7-upcoming-changes-v2
My sql 5.7-upcoming-changes-v2
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
PHP tips by a MYSQL DBA
PHP tips by a MYSQL DBAPHP tips by a MYSQL DBA
PHP tips by a MYSQL DBA
 
MySQL 5.7. Tutorial - Dutch PHP Conference 2015
MySQL 5.7. Tutorial - Dutch PHP Conference 2015MySQL 5.7. Tutorial - Dutch PHP Conference 2015
MySQL 5.7. Tutorial - Dutch PHP Conference 2015
 
MySQL 5.7 Tutorial Dutch PHP Conference 2015
MySQL 5.7 Tutorial Dutch PHP Conference 2015MySQL 5.7 Tutorial Dutch PHP Conference 2015
MySQL 5.7 Tutorial Dutch PHP Conference 2015
 
11 Things About11g
11 Things About11g11 Things About11g
11 Things About11g
 
11thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp0111thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp01
 
Oracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor formatOracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor format
 
Short Intro to PHP and MySQL
Short Intro to PHP and MySQLShort Intro to PHP and MySQL
Short Intro to PHP and MySQL
 
Window functions in MySQL 8.0
Window functions in MySQL 8.0Window functions in MySQL 8.0
Window functions in MySQL 8.0
 
MySQLinsanity
MySQLinsanityMySQLinsanity
MySQLinsanity
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)
MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)
MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)
 
Introduction to Parallel Execution
Introduction to Parallel ExecutionIntroduction to Parallel Execution
Introduction to Parallel Execution
 

More from Robert Treat

Advanced Int->Bigint Conversions
Advanced Int->Bigint ConversionsAdvanced Int->Bigint Conversions
Advanced Int->Bigint ConversionsRobert Treat
 
Explaining Explain
Explaining ExplainExplaining Explain
Explaining ExplainRobert Treat
 
the-lost-art-of-plpgsql
the-lost-art-of-plpgsqlthe-lost-art-of-plpgsql
the-lost-art-of-plpgsqlRobert Treat
 
Managing Chaos In Production: Testing vs Monitoring
Managing Chaos In Production: Testing vs MonitoringManaging Chaos In Production: Testing vs Monitoring
Managing Chaos In Production: Testing vs MonitoringRobert Treat
 
Managing Databases In A DevOps Environment 2016
Managing Databases In A DevOps Environment 2016Managing Databases In A DevOps Environment 2016
Managing Databases In A DevOps Environment 2016Robert Treat
 
Less Alarming Alerts - SRECon 2016
Less Alarming Alerts - SRECon 2016 Less Alarming Alerts - SRECon 2016
Less Alarming Alerts - SRECon 2016 Robert Treat
 
What Ops Can Learn From Design
What Ops Can Learn From DesignWhat Ops Can Learn From Design
What Ops Can Learn From DesignRobert Treat
 
Postgres 9.4 First Look
Postgres 9.4 First LookPostgres 9.4 First Look
Postgres 9.4 First LookRobert Treat
 
Less Alarming Alerts!
Less Alarming Alerts!Less Alarming Alerts!
Less Alarming Alerts!Robert Treat
 
Past, Present, and Pachyderm - All Things Open - 2013
Past, Present, and Pachyderm - All Things Open - 2013Past, Present, and Pachyderm - All Things Open - 2013
Past, Present, and Pachyderm - All Things Open - 2013Robert Treat
 
Big Bad "Upgraded" Postgres
Big Bad "Upgraded" PostgresBig Bad "Upgraded" Postgres
Big Bad "Upgraded" PostgresRobert Treat
 
Managing Databases In A DevOps Environment
Managing Databases In A DevOps EnvironmentManaging Databases In A DevOps Environment
Managing Databases In A DevOps EnvironmentRobert Treat
 
The Essential PostgreSQL.conf
The Essential PostgreSQL.confThe Essential PostgreSQL.conf
The Essential PostgreSQL.confRobert Treat
 
Advanced WAL File Management With OmniPITR
Advanced WAL File Management With OmniPITRAdvanced WAL File Management With OmniPITR
Advanced WAL File Management With OmniPITRRobert Treat
 
Scaling with Postgres (Highload++ 2010)
Scaling with Postgres (Highload++ 2010)Scaling with Postgres (Highload++ 2010)
Scaling with Postgres (Highload++ 2010)Robert Treat
 
Intro to Postgres 9 Tutorial
Intro to Postgres 9 TutorialIntro to Postgres 9 Tutorial
Intro to Postgres 9 TutorialRobert Treat
 
Database Scalability Patterns
Database Scalability PatternsDatabase Scalability Patterns
Database Scalability PatternsRobert Treat
 
A Guide To PostgreSQL 9.0
A Guide To PostgreSQL 9.0A Guide To PostgreSQL 9.0
A Guide To PostgreSQL 9.0Robert Treat
 

More from Robert Treat (20)

Advanced Int->Bigint Conversions
Advanced Int->Bigint ConversionsAdvanced Int->Bigint Conversions
Advanced Int->Bigint Conversions
 
Explaining Explain
Explaining ExplainExplaining Explain
Explaining Explain
 
the-lost-art-of-plpgsql
the-lost-art-of-plpgsqlthe-lost-art-of-plpgsql
the-lost-art-of-plpgsql
 
Managing Chaos In Production: Testing vs Monitoring
Managing Chaos In Production: Testing vs MonitoringManaging Chaos In Production: Testing vs Monitoring
Managing Chaos In Production: Testing vs Monitoring
 
Managing Databases In A DevOps Environment 2016
Managing Databases In A DevOps Environment 2016Managing Databases In A DevOps Environment 2016
Managing Databases In A DevOps Environment 2016
 
Less Alarming Alerts - SRECon 2016
Less Alarming Alerts - SRECon 2016 Less Alarming Alerts - SRECon 2016
Less Alarming Alerts - SRECon 2016
 
What Ops Can Learn From Design
What Ops Can Learn From DesignWhat Ops Can Learn From Design
What Ops Can Learn From Design
 
Postgres 9.4 First Look
Postgres 9.4 First LookPostgres 9.4 First Look
Postgres 9.4 First Look
 
Less Alarming Alerts!
Less Alarming Alerts!Less Alarming Alerts!
Less Alarming Alerts!
 
Past, Present, and Pachyderm - All Things Open - 2013
Past, Present, and Pachyderm - All Things Open - 2013Past, Present, and Pachyderm - All Things Open - 2013
Past, Present, and Pachyderm - All Things Open - 2013
 
Big Bad "Upgraded" Postgres
Big Bad "Upgraded" PostgresBig Bad "Upgraded" Postgres
Big Bad "Upgraded" Postgres
 
Managing Databases In A DevOps Environment
Managing Databases In A DevOps EnvironmentManaging Databases In A DevOps Environment
Managing Databases In A DevOps Environment
 
The Essential PostgreSQL.conf
The Essential PostgreSQL.confThe Essential PostgreSQL.conf
The Essential PostgreSQL.conf
 
Pro Postgres 9
Pro Postgres 9Pro Postgres 9
Pro Postgres 9
 
Advanced WAL File Management With OmniPITR
Advanced WAL File Management With OmniPITRAdvanced WAL File Management With OmniPITR
Advanced WAL File Management With OmniPITR
 
Scaling with Postgres (Highload++ 2010)
Scaling with Postgres (Highload++ 2010)Scaling with Postgres (Highload++ 2010)
Scaling with Postgres (Highload++ 2010)
 
Intro to Postgres 9 Tutorial
Intro to Postgres 9 TutorialIntro to Postgres 9 Tutorial
Intro to Postgres 9 Tutorial
 
Check Please!
Check Please!Check Please!
Check Please!
 
Database Scalability Patterns
Database Scalability PatternsDatabase Scalability Patterns
Database Scalability Patterns
 
A Guide To PostgreSQL 9.0
A Guide To PostgreSQL 9.0A Guide To PostgreSQL 9.0
A Guide To PostgreSQL 9.0
 

Recently uploaded

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
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"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
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Recently uploaded (20)

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
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
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
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"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
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

Pro PostgreSQL

  • 1. Pro PostgreSQL Robert Treat omniti.com brighterlamp.org
  • 2.
  • 3.
  • 4. C-0 Get Off To A Good Start
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. D-0 Let's Talk About Upgrades
  • 14. D-1 Let's Talk About Upgrades Versioning First Digit ( 7 .4.16 -> 8 .2.0) Second Digit (8.2.4 -> 8.3.0) Third Digit (8.3.0 -> 8.3.1)
  • 15. D-2 Let's Talk About Upgrades Versioning First Digit (7.4.16 -> 8.2.0) Second Digit (8. 2 .4 -> 8. 3 .0) Third Digit (8.3.0 -> 8.3.1)
  • 16. D-3 Let's Talk About Upgrades Versioning First Digit (7.4.16 -> 8.2.0) Second Digit (8.2.4 -> 8.3.0) Third Digit (8.3. 0 -> 8.3. 1 )
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. E-0 Figure Your Configure
  • 23.
  • 24.
  • 25.
  • 27.
  • 28.
  • 29.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 41.
  • 42.
  • 43. I-3 Beyond Simple SQL rownum()
  • 44. I-4 Beyond Simple SQL row numbering
  • 45. I-5 Beyond Simple SQL row numbering pagila=# select (select count(*)+1 from customer where customer_id < x.customer_id) as rownum, customer_id, first_name, last_name from customer x limit 5; rownum | customer_id | first_name | last_name --------+-------------+------------+----------- 1 | 1 | MARY | SMITH 2 | 3 | LINDA | WILLIAMS 3 | 4 | BARBARA | JONES 4 | 5 | ELIZABETH | BROWN 5 | 6 | JENNIFER | DAVIS (5 rows)
  • 46. I-6 Beyond Simple SQL row numbering pagila=# select (select count(*)+1 from customer where customer_id < x.customer_id) as rownum, customer_id, first_name, last_name from customer x limit 5; rownum | customer_id | first_name | last_name --------+-------------+------------+----------- 1 | 1 | MARY | SMITH 2 | 3 | LINDA | WILLIAMS 3 | 4 | BARBARA | JONES 4 | 5 | ELIZABETH | BROWN 5 | 6 | JENNIFER | DAVIS (5 rows)
  • 47.
  • 48.
  • 49. I-9 Beyond Simple SQL rollup() pagila=# select customer_id, amount from payment limit 10; customer_id | amount -------------+-------- 267 | 7.98 267 | 0.00 269 | 3.98 269 | 0.00 274 | 0.99 279 | 4.99 282 | 0.99 284 | 5.98 284 | 0.00 287 | 0.99 (10 rows)
  • 50.
  • 51. I-11 Beyond Simple SQL rank() SELECT * FROM (select c1.first_name, c1.last_name, c1.store_id, p1.total, (select 1 + count(*) from customer c2 join (select customer_id, sum(amount) as total from only payment group by customer_id) p2 using (customer_id) where c2.store_id = c1.store_id and p2.total > p1.total) as rank from customer c1 join (select customer_id, sum(amount) as total from only payment group by customer_id) p1 using (customer_id) ) x WHERE x.rank <= 3 ORDER BY x.store_id, x.rank; first_name | last_name | store_id | total | rank ------------+-----------+----------+--------+------ ELEANOR | HUNT | 1 | 216.54 | 1 CLARA | SHAW | 1 | 195.58 | 2 TOMMY | COLLAZO | 1 | 186.62 | 3 KARL | SEAL | 2 | 221.55 | 1 MARION | SNYDER | 2 | 194.61 | 2 RHONDA | KENNEDY | 2 | 194.61 | 2 (6 rows)
  • 52. I-12 Beyond Simple SQL SELECT * FROM (SELECT c1.first_name, c1.last_name, c1.store_id, p1.total, (SELECT 1 + count(*) FROM customer c2 JOIN (SELECT customer_id, sum(amount) AS total FROM payment GROUP BY customer_id) p2 USING (customer_id) WHERE c2.store_id = c1.store_id AND p2.total > p1.total ) AS rank FROM customer c1 JOIN (SELECT customer_id, sum(amount) AS total FROM payment GROUP BY customer_id) p1 USING (customer_id) ) x WHERE x.rank <= 3 ORDER BY x.store_id, x.rank;
  • 53. I-13 Beyond Simple SQL SELECT * FROM (SELECT c1.first_name, c1.last_name, c1.store_id, p1.total, (SELECT 1 + count(*) FROM customer c2 JOIN (SELECT customer_id, sum(amount) AS total FROM payment GROUP BY customer_id) p2 USING (customer_id) WHERE c2.store_id = c1.store_id AND p2.total > p1.total ) AS rank FROM customer c1 JOIN (SELECT customer_id, sum(amount) AS total FROM payment GROUP BY customer_id) p1 USING (customer_id) ) x WHERE x.rank <= 3 ORDER BY x.store_id, x.rank;
  • 54. I-14 Beyond Simple SQL SELECT * FROM (SELECT c1.first_name, c1.last_name, c1.store_id, p1.total, (SELECT 1 + count(*) FROM customer c2 JOIN (SELECT customer_id, sum(amount) AS total FROM payment GROUP BY customer_id) p2 USING (customer_id) WHERE c2.store_id = c1.store_id AND p2.total > p1.total ) AS rank FROM customer c1 JOIN (SELECT customer_id, sum(amount) AS total FROM payment GROUP BY customer_id) p1 USING (customer_id) ) x WHERE x.rank <= 3 ORDER BY x.store_id, x.rank;
  • 55. I-15 Beyond Simple SQL SELECT * FROM (SELECT c1.first_name, c1.last_name, c1.store_id, p1.total, (SELECT 1 + count(*) FROM customer c2 JOIN (SELECT customer_id, sum(amount) AS total FROM payment GROUP BY customer_id) p2 USING (customer_id) WHERE c2.store_id = c1.store_id AND p2.total > p1.total ) AS rank FROM customer c1 JOIN (SELECT customer_id, sum(amount) AS total FROM payment GROUP BY customer_id) p1 USING (customer_id) ) x WHERE x.rank <= 3 ORDER BY x.store_id, x.rank;
  • 56. I-16 Beyond Simple SQL SELECT * FROM (SELECT c1.first_name, c1.last_name, c1.store_id, p1.total, (SELECT 1 + count(*) FROM customer c2 JOIN (SELECT customer_id, sum(amount) AS total FROM payment GROUP BY customer_id) p2 USING (customer_id) WHERE c2.store_id = c1.store_id AND p2.total > p1.total ) AS rank FROM customer c1 JOIN (SELECT customer_id, sum(amount) AS total FROM payment GROUP BY customer_id) p1 USING (customer_id) ) x WHERE x.rank <= 3 ORDER BY x.store_id, x.rank;
  • 57. J-0 Query Your Queries
  • 58.
  • 59.
  • 60. J-3 Query Your Queries finding slow queries: pg_stat_all_tables pagila=# pg_stat_all_tables View &quot;pg_catalog.pg_stat_all_tables&quot; Column | Type | ----------------+-------------------------- relid | oid | schemaname | name | relname | name | seq_scan | bigint | seq_tup_read | bigint | idx_scan | bigint | idx_tup_fetch | bigint | n_tup_ins | bigint | n_tup_upd | bigint | n_tup_del | bigint |
  • 61. J-4 Query Your Queries finding slow queries: pg_stat_all_tables pagila=# pg_stat_all_tables View &quot;pg_catalog.pg_stat_all_tables&quot; Column | Type | ----------------+-------------------------- relid | oid | schemaname | name | relname | name | seq_scan | bigint | seq_tup_read | bigint | idx_scan | bigint | idx_tup_fetch | bigint | n_tup_ins | bigint | n_tup_upd | bigint | n_tup_del | bigint |
  • 62. J-5 Query Your Queries finding slow queries: pg_stat_all_tables pagila=# pg_stat_all_tables View &quot;pg_catalog.pg_stat_all_tables&quot; Column | Type | ----------------+-------------------------- relid | oid | schemaname | name | relname | name | seq_scan | bigint | seq_tup_read | bigint | idx_scan | bigint | idx_tup_fetch | bigint | n_tup_ins | bigint | n_tup_upd | bigint | n_tup_del | bigint |
  • 63. J-6 Query Your Queries finding slow queries: pg_stat_all_tables pagila=# pg_stat_all_tables View &quot;pg_catalog.pg_stat_all_tables&quot; Column | Type | ----------------+-------------------------- relid | oid | schemaname | name | relname | name | seq_scan | bigint | seq_tup_read | bigint | idx_scan | bigint | idx_tup_fetch | bigint | n_tup_ins | bigint | n_tup_upd | bigint | n_tup_del | bigint |
  • 64. J-7 Query Your Queries finding slow queries: pg_stat_all_indexes pagila=# pg_stat_all_indexes View &quot;pg_catalog.pg_stat_all_indexes&quot; Column | Type | ---------------+--------+ relid | oid | indexrelid | oid | schemaname | name | relname | name | indexrelname | name | idx_scan | bigint | idx_tup_read | bigint | idx_tup_fetch | bigint |
  • 65. J-8 Query Your Queries finding slow queries: pg_stat_all_indexes pagila=# pg_stat_all_indexes View &quot;pg_catalog.pg_stat_all_indexes&quot; Column | Type | ---------------+--------+ relid | oid | indexrelid | oid | schemaname | name | relname | name | indexrelname | name | idx_scan | bigint | idx_tup_read | bigint | idx_tup_fetch | bigint |
  • 66. J-9 Query Your Queries finding slow queries: pg_statio_all_tables pagila=# pg_statio_all_tables View &quot;pg_catalog.pg_statio_all_tables&quot; Column | Type | -----------------+--------+ relid | oid | schemaname | name | relname | name | heap_blks_read | bigint | heap_blks_hit | bigint | idx_blks_read | bigint | idx_blks_hit | bigint | toast_blks_read | bigint | toast_blks_hit | bigint | tidx_blks_read | bigint | tidx_blks_hit | bigint |
  • 67. J-9 Query Your Queries finding slow queries: pg_statio_all_tables pagila=# pg_statio_all_tables View &quot;pg_catalog.pg_statio_all_tables&quot; Column | Type | -----------------+--------+ relid | oid | schemaname | name | relname | name | heap_blks_read | bigint | heap_blks_hit | bigint | idx_blks_read | bigint | idx_blks_hit | bigint | toast_blks_read | bigint | toast_blks_hit | bigint | tidx_blks_read | bigint | tidx_blks_hit | bigint |
  • 68.
  • 69.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 79.
  • 80.
  • 82.
  • 83.
  • 84.
  • 85. K-0 Other Stuff I Should Mention
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
  • 93.
  • 94. K-7 Other Stuff I Should Mention ;-) my book?
  • 95.