In this chapter, a number of query optimizations were discussed. You learned about the optimizer and about various internal optimizations, such as constant folding, view inlining, joins, and much more. All of these optimizations contribute to good performance and help speed things up considerably.
Now that we've covered this introduction to optimizations, in the next chapter, Chapter 7, Writing Stored Procedures, we will talk about stored procedures. You will learn about all the options PostgreSQL has so that we can handle user-defined code.