Understanding Bitmap Heap Scans in PostgreSQL

Introduction When people first start reading PostgreSQL execution plans, they quickly learn a few common scan types: Seq Scan , Index Scan , Index Only Scan . But eventually another one appears that is less obvious: Bitmap Heap Scan , which is almost always accompanied by Bitmap Index Scan . At first glance, it sounds like two scans on the same table – a very inefficient choice?! But bitmap scans…