Chapter 6 - Indexes
“Only he who attempts the ridiculous may achieve the impossible.”
– Don Quixote
There are Only Three Types of Scans
Sequential scan – This is a Full Table Scan. Each vworker that holds a portion of a table will begin reading from the first row to the last row. This is the slowest of all scans.
Index scan – When an index has been placed on a column used in the WHERE clause of the SQL, the optimizer will consider using the index subtable to perform the scan. The index will hold the secondary index values and contain pointers to the base rows. If the Postgres optimizer thinks that the answer set will contain < 20% of the base rows, it will use the index scan. An index scan is much like an index at the back of a book. If you only ...