Skip to Content
Mastering PostgreSQL 12 - Third Edition
book

Mastering PostgreSQL 12 - Third Edition

by Hans-Jürgen Schönig
November 2019
Beginner to intermediate
470 pages
11h 59m
English
Packt Publishing
Content preview from Mastering PostgreSQL 12 - Third Edition

Spotting changes in runtime

When looking at a plan, there are always two questions that you have got to ask yourself:

  • Is the runtime shown by the EXPLAIN ANALYZE clause justified for the given query?
  • If the query is slow, where does the runtime jump?

In my case, the sequential scan is rated at 2.625 milliseconds. The sort is done after 7.199 milliseconds, so the sort takes roughly 4.5 milliseconds to complete and is therefore responsible for most of the runtime that's needed by the query.

Looking for jumps in the execution time of the query will reveal what's really going on. Depending on which type of operation will burn too much time, you have to act accordingly. Some general advice is not possible here because there are simply too many ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering PostgreSQL 11 - Second Edition

Mastering PostgreSQL 11 - Second Edition

Hans-Jürgen Schönig
Learning PostgreSQL 11 - Third Edition

Learning PostgreSQL 11 - Third Edition

Christopher Travers, Andrey Volkov
PostgreSQL Server Programming - Second Edition

PostgreSQL Server Programming - Second Edition

Usama Dar, Hannu Krosing, Jim Mlodgenski, Kirk Roybal

Publisher Resources

ISBN: 9781838988821Supplemental Content