Overview
- Covers query tuning, rather than system configuration or hardware
- Uses the open-source postgres_air database for more than hundred realistic examples
- Introduces the NORM application design methodology
Access this book
Tax calculation will be finalised at checkout
Other ways to access
Table of contents (16 chapters)
Keywords
About this book
Write optimized queries. This book helps you write queries that perform fast and deliver results on time. You will learn that query optimization is not a dark art practiced by a small, secretive cabal of sorcerers. Any motivated professional can learn to write efficient queries from the get-go and capably optimize existing queries. You will learn to look at the process of writing a query from the database engine’s point of view, and know how to think like the database optimizer.
The book begins with a discussion of what a performant system is and progresses to measuring performance and setting performance goals. It introduces different classes of queries and optimization techniques suitable to each, such as the use of indexes and specific join algorithms. You will learn to read and understand query execution plans along with techniques for influencing those plans for better performance. The book also covers advanced topics such as the use of functions and procedures, dynamic SQL, and generated queries. All of these techniques are then used together to produce performant applications, avoiding the pitfalls of object-relational mappers.
What You Will Learn
- Identify optimization goals in OLTP and OLAP systems
- Read and understand PostgreSQL execution plans
- Distinguish between short queries and long queries
- Choose the right optimization technique for each query type
- Identify indexes that will improve query performance
- Optimize full table scans
- Avoid the pitfalls of object-relational mapping systems
- Optimize the entire application rather than just database queries
Who This Book Is For
IT professionals working in PostgreSQL who want to develop performant and scalable applications, anyone whosejob title contains the words “database developer” or “database administrator" or who is a backend developer charged with programming database calls, and system architects involved in the overall design of application systems running against a PostgreSQL database
Authors and Affiliations
About the authors
Boris Novikov is currently a professor in the Department of Informatics at National Research University Higher School of Economics in Saint Petersburg, Russia. He graduated from Leningrad University’s School of Mathematics and Mechanics. He hasworked for Saint Petersburg University for a number of years and moved to his current position in January, 2019. His research interests are in a broad area of information management and include several aspects of design, development, and tuning of databases, applications, and database management systems. He also has interests in distributed scalable systems for stream processing and analytics.
Anna Bailliekova is Senior Data Engineer at Zendesk. Previously, she built ETL pipelines, data warehouse resources, and reporting tools as a team lead on the Division Operations team at Epic. She has also held analyst roles on a variety of political campaigns and at Greenberg Quinlan Rosner Research. She received her undergraduate degree cum laude with College Honors in political science and computer science from Knox College in Galesburg, Illinois.
Bibliographic Information
Book Title: PostgreSQL Query Optimization
Book Subtitle: The Ultimate Guide to Building Efficient Queries
Authors: Henrietta Dombrovskaya, Boris Novikov, Anna Bailliekova
DOI: https://doi.org/10.1007/978-1-4842-6885-8
Publisher: Apress Berkeley, CA
eBook Packages: Professional and Applied Computing, Apress Access Books, Professional and Applied Computing (R0)
Copyright Information: Henrietta Dombrovskaya, Boris Novikov, Anna Bailliekova 2021
eBook ISBN: 978-1-4842-6885-8Published: 22 April 2021
Edition Number: 1
Number of Pages: XXIII, 319
Number of Illustrations: 116 b/w illustrations
Topics: Database Management, Open Source