Book description
Get to know effective ways to improve PostgreSQL’s performance and master query optimization, and database monitoring.
About This Book
Perform essential database tasks such as benchmarking the database and optimizing the server’s memory usage
Learn ways to improve query performance and optimize the PostgreSQL server
Explore a wide range of high availability and replication mechanisms to build robust, highly available, scalable, and fault-tolerant PostgreSQL databases
Who This Book Is For
If you are a developer or administrator with limited PostgreSQL knowledge and want to develop your skills with this great open source database, then this book is ideal for you. Learning how to enhance the database performance is always an exciting topic to everyone, and this book will show you enough ways to enhance the database performance.
What You Will Learn
Build replication strategies for homogeneous and heterogeneous databases
Test and build a powerful machine with multiple bench marking techniques
Get to know a few SQL injection techniques
Find out how to manage the replication using multiple tools
Benchmark the database server using multiple strategies
Work with the query processing algorithms and their internal behaviors
Build a proper plan to upgrade or migrate to PostgreSQL from other databases
See the essential database load balancing techniques and the various partitioning approaches PostgreSQL provides
Learn memory optimization techniques and database server configurations
In Detail
PostgreSQL is one of the most powerful and easy to use database management systems. It has strong support from the community and is being actively developed with a new release every year. PostgreSQL supports the most advanced features included in SQL standards. It also provides NoSQL capabilities and very rich data types and extensions. All of this makes PostgreSQL a very attractive solution in software systems.
If you run a database, you want it to perform well and you want to be able to secure it. As the world’s most advanced open source database, PostgreSQL has unique built-in ways to achieve these goals. This book will show you a multitude of ways to enhance your database’s performance and give you insights into measuring and optimizing a PostgreSQL database to achieve better performance.
This book is your one-stop guide to elevate your PostgreSQL knowledge to the next level. First, you’ll get familiarized with essential developer/administrator concepts such as load balancing, connection pooling, and distributing connections to multiple nodes. Next, you will explore memory optimization techniques before exploring the security controls offered by PostgreSQL. Then, you will move on to the essential database/server monitoring and replication strategies with PostgreSQL. Finally, you will learn about query processing algorithms.
Style and approach
This comprehensive guide is packed with practical administration tasks. Each topic is explained using examples and a step-by-step approach.
Table of contents
-
PostgreSQL High Performance Cookbook
- PostgreSQL High Performance Cookbook
- Credits
- About the Authors
- About the Reviewers
- www.PacktPub.com
- Customer Feedback
- Preface
- 1. Database Benchmarking
- 2. Server Configuration and Control
- 3. Device Optimization
-
4. Monitoring Server Performance
- Introduction
- Monitoring CPU usage
- Monitoring paging and swapping
- Tracking CPU consuming processes
- Monitoring CPU load
- Identifying CPU bottlenecks
- Identifying disk I/O bottlenecks
- Monitoring system load
- Tracking historical CPU usage
- Tracking historical memory usage
- Monitoring disk space
- Monitoring network status
- 5. Connection Pooling and Database Partitioning
- 6. High Availability and Replication
- 7. Working with Third-Party Replication Management Utilities
-
8. Database Monitoring and Performance
- Introduction
- Checking active sessions
- Finding out what the users are currently running
- Finding blocked sessions
- Dealing with deadlocks
- Table access statistics
- Logging slow statements
- Determining disk usage
- Preventing page corruption
- Routine reindexing
- Generating planner statistics
- Tuning with background writer statistics
- 9. Vacuum Internals
- 10. Data Migration from Other Databases to PostgreSQL and Upgrading the PostgreSQL Cluster
-
11. Query Optimization
- Introduction
- Using sample data sets
- Timing overhead
- Studying hot and cold cache behavior
- Clearing the cache
- Query plan node structure
- Generating an explain plan
- Computing basic cost
- Running sequential scans
- Running bitmap heap and index scan
- Aggregate and hash aggregate
- Running CTE scan
- Nesting loops
- Working with hash and merge join
- Grouping
- Working with set operations
- Working on semi and anti joins
- 12. Database Indexing
Product information
- Title: PostgreSQL High Performance Cookbook
- Author(s):
- Release date: March 2017
- Publisher(s): Packt Publishing
- ISBN: 9781785284335
You might also like
book
PostgreSQL 13 Cookbook
Get to grips with building reliable, scalable, and maintainable database solutions for enterprises and production databases …
book
PostgreSQL 12 High Availability Cookbook
A comprehensive guide to understanding key techniques for architecture and hardware planning, monitoring, replication, backups, and …
book
Practical PostgreSQL
Arguably the most capable of all the open source databases, PostgreSQL is an object-relational database management …
book
PostgreSQL High Availability Cookbook - Second Edition
Master over 100 recipes to design and implement a highly available server with the advanced features …