Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learn PostgreSQL - Second Edition

You're reading from  Learn PostgreSQL - Second Edition

Product type Book
Published in Oct 2023
Publisher Packt
ISBN-13 9781837635641
Pages 744 pages
Edition 2nd Edition
Languages
Authors (2):
Luca Ferrari Luca Ferrari
Profile icon Luca Ferrari
Enrico Pirozzi Enrico Pirozzi
Profile icon Enrico Pirozzi
View More author details

Table of Contents (22) Chapters

Preface Introduction to PostgreSQL Getting to Know Your Cluster Managing Users and Connections Basic Statements Advanced Statements Window Functions Server-Side Programming Triggers and Rules Partitioning Users, Roles, and Database Security Transactions, MVCC, WALs, and Checkpoints Extending the Database – the Extension Ecosystem Query Tuning, Indexes, and Performance Optimization Logging and Auditing Backup and Restore Configuration and Monitoring Physical Replication Logical Replication Useful Tools and Extensions Other Books You May Enjoy
Index

Examples of query tuning

In the previous section, you learned how EXPLAIN can show the plan PostgreSQL will use to access the underlying data; it is now time to use EXPLAIN to tune some slow queries and improve performance.

This section will show you some basic concepts of the day-to-day usage of EXPLAIN as a powerful tool to determine where and how to instrument PostgreSQL in accessing data faster. Of course, query tuning is a very complex subject and often requires repeated trial-based optimization, so the aim of this section is not to provide you with in-depth knowledge about query tuning but rather a basic understanding of how to improve your own database and queries.

Sometimes, tuning a query involves simply rewriting it in a way that is more comfortable for – or better, more comprehensible to – PostgreSQL, but most often, query tuning means using an appropriate index to speed up access to the underlying data.

One important thing to take into account...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}