Mastering PostgreSQL 13
Build, administer, and maintain database applications efficiently with PostgreSQL 13, 4th Edition
Hans-Jürgen Schönig
- 476 pagine
- English
- ePUB (disponibile sull'app)
- Disponibile su iOS e Android
Mastering PostgreSQL 13
Build, administer, and maintain database applications efficiently with PostgreSQL 13, 4th Edition
Hans-Jürgen Schönig
Informazioni sul libro
Explore expert techniques such as advanced indexing and high availability to build scalable, reliable, and fault-tolerant database applications using PostgreSQL 13
Key Features
- Master advanced PostgreSQL 13 concepts with the help of real-world datasets and examples
- Leverage PostgreSQL's indexing features to fine-tune the performance of your queries
- Extend PostgreSQL's functionalities to suit your organization's needs with minimal effort
Book Description
Thanks to its reliability, robustness, and high performance, PostgreSQL has become one of the most advanced open source databases on the market. This updated fourth edition will help you understand PostgreSQL administration and how to build dynamic database solutions for enterprise apps with the latest release of PostgreSQL, including designing both physical and technical aspects of the system architecture with ease.
Starting with an introduction to the new features in PostgreSQL 13, this book will guide you in building efficient and fault-tolerant PostgreSQL apps. You'll explore advanced PostgreSQL features, such as logical replication, database clusters, performance tuning, advanced indexing, monitoring, and user management, to manage and maintain your database. You'll then work with the PostgreSQL optimizer, configure PostgreSQL for high speed, and move from Oracle to PostgreSQL. The book also covers transactions, locking, and indexes, and shows you how to improve performance with query optimization. You'll also focus on how to manage network security and work with backups and replication while exploring useful PostgreSQL extensions that optimize the performance of large databases.
By the end of this PostgreSQL book, you'll be able to get the most out of your database by executing advanced administrative tasks.
What you will learn
- Get well versed with advanced SQL functions in PostgreSQL 13
- Get to grips with administrative tasks such as log file management and monitoring
- Work with stored procedures and manage backup and recovery
- Employ replication and failover techniques to reduce data loss
- Perform database migration from Oracle to PostgreSQL with ease
- Replicate PostgreSQL database systems to create backups and scale your database
- Manage and improve server security to protect your data
- Troubleshoot your PostgreSQL instance to find solutions to common and not-so-common problems
Who this book is for
This database administration book is for PostgreSQL developers and database administrators and professionals who want to implement advanced functionalities and master complex administrative tasks with PostgreSQL 13. Prior experience in PostgreSQL and familiarity with the basics of database administration will assist with understanding key concepts covered in the book.
Domande frequenti
Informazioni
- Learning what the optimizer does
- Understanding execution plans
- Understanding and fixing joins
- Enabling and disabling optimizer settings
- Partitioning data
- Adjusting parameters for good query performance
- Making use of parallel queries
- Introducing Just-in-Time (JIT) compilation
Learning what the optimizer does
A practical example – How the query optimizer handles a sample query
CREATE TABLE a (aid int, ...); -- 100 million rows CREATE TABLE b (bid int, ...); -- 200 million rows CREATE TABLE c (cid int, ...); -- 300 million rows
CREATE INDEX idx_a ON a (aid); CREATE INDEX idx_b ON b (bid); CREATE INDEX idx_c ON c (cid);
CREATE VIEW v AS SELECT *
FROM a, b
WHERE aid = bid;
SELECT *
FROM v, c
WHERE v.aid = c.cid
AND cid = 4;
Evaluating join options
Nested loops
for x in table1:
for y in table2:
if x.field == y.field
issue row
else
keep doing
Hash joins
Hash join
Sequential scan table 1
Sequential scan table 2
Merge joins
Merge join
Sort table 1
Sequential scan table 1
Sort table 2
Sequential scan table 2
Merge join
Index scan table 1
Index scan table 2
Applying transformations
- Inlining the view: The first transformation that the optimizer does is i...