PostgreSQL Forcing Join Order 11/12

Опубликовано: 09 Октябрь 2024
на канале: High-Performance Programming
2,842
38

If you found this video helpful, you could check the full course on Udemy. In this course, you’ll find tips for tuning PostgreSQL 12 like a pro.

Use the link below to get a 60% OFF.

PostgreSQL High-Performance Tuning Guide - Full Course
https://www.udemy.com/course/postgres...

During the planning process, PostgreSQL tries to check all possible join orders. In many cases, this can be pretty expensive because there can be many permutations, which naturally slows down the planning process.
PostgreSQL will do searches for an optimal plan which is time-consuming, and it has the potential to make a bad decision. If you know the right way to join the tables efficiently and want to reduce planning time you can force the order of execution. You can tell the optimizer to use the order you specified when doing a series of explicit JOIN operations.