What is a bitmap index scan in PostgreSQL and when does the optimizer prefer it?

Advanced SQL Developer Medium

Advanced SQL Developer — Medium

What is a bitmap index scan in PostgreSQL and when does the optimizer prefer it?

Key points

  • Bitmap index scan creates a bitmap of heap page locations
  • Optimizer uses this method when query matches moderate rows
  • More efficient than full table scan or sequential scan
  • Useful when combining multiple indexes via bitmap AND/OR

Ready to go further?

Related questions