Sobes.tech
Middle

Tell me about bitmap, function-based, and reverse key indexes — what are they?

sobes.tech AI

Answer from AI

Bitmap index — an index where a bit map is stored for each column value, indicating in which rows this value appears. Efficient for columns with low cardinality (e.g., gender, status). Allows fast AND, OR operations on bit maps.

Function-based index — an index built not directly on column values, but on the result of a function applied to these values. Accelerates queries with conditions using functions, for example, indexing LOWER(name) for quick case-insensitive search.

Reverse key index — an index where keys are reversed (for example, the number 12345 becomes 54321) before indexing. This helps distribute records more evenly across index pages and reduces locking during inserts, especially for sequential values, such as order numbers.

Each index type is optimized for specific use cases and helps improve query performance.