Jump to ratings and reviews
Rate this book

PostgreSQL Query Optimization: The Ultimate Guide to Building Efficient Queries

Rate 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 LearnIdentify optimization goals in OLTP and OLAP systemsRead and understand PostgreSQL execution plansDistinguish between short queries and long queriesChoose the right optimization technique for each query typeIdentify indexes that will improve query performanceOptimize full table scansAvoid the pitfalls of object-relational mapping systemsOptimize the entire application rather than just database queries

Who This Book Is ForIT professionals working in PostgreSQL who want to develop performant and scalable applications, anyone whose job 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

426 pages, Kindle Edition

Published April 22, 2021

25 people are currently reading
64 people want to read

About the author

Henrietta Dombrovskaya

5 books1 follower

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
15 (40%)
4 stars
14 (37%)
3 stars
7 (18%)
2 stars
0 (0%)
1 star
1 (2%)
Displaying 1 of 1 review
Profile Image for Serhii Kushchenko.
114 reviews19 followers
October 13, 2022
This book is good. It will make you the PostgreSQL queries optimization ninja.

You will gain a deep understanding of the PostgreSQL indexes. Also, you'll learn how to write dynamic SQL queries and pack them into functions for better performance.

Also, the book will be helpful to programmers who use ORM (Django, SQLAlchemy, etc.). It is desirable to see what queries it makes to the database. It may be a good idea to replace some of these automatically generated SQL queries with more performant ones that you write manually.

This book exceeded my expectations. I strongly recommend reading it if you are interested in PostgreSQL.
Displaying 1 of 1 review

Can't find what you're looking for?

Get help and learn more about the design.