Skip to Main Content
PostgreSQL 10 High Performance - Third Edition
book

PostgreSQL 10 High Performance - Third Edition

by Enrico Pirozzi
April 2018
Intermediate to advanced content levelIntermediate to advanced
508 pages
15h 22m
English
Packt Publishing
Content preview from PostgreSQL 10 High Performance - Third Edition

Avoiding plan restructuring with OFFSET

Another technique that shows up sometimes to work around bad plan issues is using OFFSET 0 strategically in a query. Having no offset from when results return doesn't change the query result, but it is considered a volatile change that prevents some types of plan node changessometimes in a good way, despite what the planner predicts.

A good example of how this can work comes from a potential performance regression from certain types of joins that was introduced in PostgreSQL 8.4, and also still exists in 9.0 and 10.0. It's an interesting case study in how progress in improving the PostgreSQL optimizer tends to happen. The problem is described by Andres Freund using a test case and associated query ...

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

PostgreSQL: Up and Running, 3rd Edition

PostgreSQL: Up and Running, 3rd Edition

Regina O. Obe, Leo S. Hsu
Learn PostgreSQL - Second Edition

Learn PostgreSQL - Second Edition

Luca Ferrari, Enrico Pirozzi
PostgreSQL, Second Edition

PostgreSQL, Second Edition

Korry Douglas, Susan Douglas

Publisher Resources

ISBN: 9781788474481Supplemental Content