O'Reilly logo

PostgreSQL 9 Administration Cookbook - Second Edition by Simon Riggs, Gianni Ciolli, Hannu Krosing, Gabriele Bartolini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. Performance and Concurrency

In this chapter, we will cover the following recipes:

  • Finding slow SQL statements
  • Collecting regular statistics from pg_stat* views
  • Finding out what makes SQL slow
  • Reducing the number of rows returned
  • Simplifying complex SQL queries
  • Speeding up queries without rewriting them
  • Why a query is not using an index
  • Forcing a query to use an index
  • Using optimistic locking
  • Reporting performance problems

Introduction

Performance and concurrency are two problems that are often tightly coupled—when concurrency grows, performance usually degrades, in some cases a lot. If you take care of performance problems, you can achieve better concurrency.

In this chapter, we will show you how to find slow queries and also how to find queries ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required