Chapter 4. Reading Data Efficiently and Correctly
Originally, this chapter was called "Reading Data Efficiently." Thinking about it for a while actually convinced me that "and Correctly" should be appended to the title. The reason is that this chapter is not just about speed; it is also about getting things right and ensuring that the result can be generated fast. What good is a fast result if it happens to be just plain wrong?
The following issues will be covered:
- NULL handling
- Fixing joins
- Using cursors
- Synchronized seq scans
- Prepared queries
- Indexes and foreign keys