Summary

A major goal of this chapter was not only to show you how a variety of queries execute, but to demonstrate through many examples how to set up a query testing playground for exploring that yourself. You shouldn't just read this chapter. You should load the Dell Store 2 data into your system and experiment with the queries yourself. If you're using PostgreSQL 9.0, the results you see should be nearly identical to the examples shown.

Try to understand how the queries are actually executed in each of these cases, based on the statistics available. Adjust the statistics collected and see if anything changes. Write new queries and see if the plans you get match what you expected. Watch how the optimizer degrades as you take away its advanced ...

Get PostgreSQL 9.0 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.