8. Performant SQL
Overview
In this chapter, you will learn how to optimize a database to allow queries to be executed with fewer resources. First, you will look at how a database engine performs basic queries by developing your understanding of sequential scans. After that, you will look at optimizing SELECT
queries by creating indexes on database tables, which improve performance. You will also learn about tools and techniques for terminating inefficient queries that are consuming your database resources. After all this, you will explore advanced functionalities by creating custom functions for special computations and examine how to apply custom constraints to your database by using triggers.