Foundationপ্রথম নীতি থেকে
LEVEL 8 · Database Systems

Bitmap Index

বিটম্যাপ ইনডেক্স

প্রতি distinct value-এর জন্য এক row-bitmap — AND/OR/NOT bit-অপারেশনেই multi-condition filter।

gender-এর প্রতি value এক bitmap, row-id order-এ:

M:  1 0 1 1 0      WHERE gender='M' AND region='E'
E:  1 0 0 1 1   →  AND: 1 0 0 1 0   ← bit-wise, কোনো row touch না করে
  • Low-cardinality column + read-heavy analytics — data warehouse-এর প্রিয়
  • Bitmap AND/OR/NOT = CPU-র সস্তা instruction; কয়েক condition merge বিনামূল্যে
  • Write-এ ভয়ংকর — এক row update অনেক bitmap ছুঁয়ে; OLTP-তে নিষেধ

PostgreSQL-এ standalone bitmap index নেই, তবে bitmap heap scan plan node আছে: index scan results-এর bitmap বানিয়ে heap-এ sorted access।