Scanning the index
Index scans improve the performance of your database queries. Index scans differ from sequential scans in that index scans execute a preprocessing step before the search of database records can occur.
The simplest way to think of an index scan is just like using the index of a text or reference book. When creating such a book, a publisher parses through the contents of the book and writes the page numbers corresponding to each alphabetically sorted topic. Just as the publisher makes the initial effort of creating an index for the reader’s reference, you can create a similar index within the PostgreSQL database before you run the queries. This index within the database creates a prepared and organized set of references to the data under specified conditions. When a query is executed and an index is present that contains information relevant to the query, the planner may elect to use the data that was preprocessed and prearranged within the index. Without...