O'Reilly logo

PostgreSQL 9 Administration Cookbook by Hannu Krosing, Simon Riggs

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 & Concurrency

In this chapter, we will cover the following:

  • Finding slow SQL statements
  • Collecting regular statistics from pg_stat* views
  • Finding what makes SQL slow
  • Reducing the number of rows returned
  • Simplifying complex SQL
  • Speeding up queries without rewriting them
  • Why queries do not use an index
  • How do force 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. And, if you take care of performance problems, you can achieve better concurrency.

In this chapter, we show you how to find slow queries, and also how to find queries that make other ...

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