DB related
Seq Scan (no index, slow)
scans the entire relation (table).
Index Scan ( index, but access a page several times)
performs a B-tree traversal, walks through the leaf nodes to find all matching entries, and fetches the corresponding table data.
Index Only Scan (index, no access table data)
performs a B-tree traversal and walks through the leaf nodes to find all matching entries. There is no table access needed.
Bitmap Index Scan / Bitmap Heap Scan / Recheck Cond (index, access page one time only base on bitmap)
A plain index-scan
fetches one tuple-pointer at a time
from the index, and immediately visits that tuple in the table.A bitmap scan
fetches all the tuple-pointers from the index in one go
, sorts them using an in-memory "bitmap" data structure, and then visits the table tuples in physical tuple-location order.Instead of accessing the Heap right after fetching a row from the index, the Bitmap Index Scan completes the index lookup first, keeping track of all rows that might be interesting (in a, you guess it, bitmap). The Bitmap Heap Scan than accesses all the interesting heap pages sequentially.
The Bitmap Index+Heap Scan operations are an optimization of the regular Index Scan
The 1st number = the cost to return the first row from that node.
The 2nd number = the cost to return all of the rows for that node.
Last updated
Was this helpful?