Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
cecfffb
Add posting index and covering index documentation
nwoolmer Mar 30, 2026
1527456
Update posting/covering index docs to match current codebase
nwoolmer Apr 10, 2026
72b98ca
Add posting index docs to explain, symbol, mat-view, config pages
nwoolmer Apr 10, 2026
630384d
Clarify encoding trade-offs: delta vs adaptive modes
nwoolmer Apr 10, 2026
e187aac
Add EF encoding as distinct option, clarify all three modes
nwoolmer Apr 10, 2026
5ef24ea
Merge remote-tracking branch 'origin/main' into nw_index
nwoolmer May 5, 2026
96b8930
Correct posting/covering index facts verified against live instance
nwoolmer May 5, 2026
eda31c8
Refine posting/covering index facts after deeper source review
nwoolmer May 5, 2026
e18de56
Drop speculative data-distribution claims from encoding example block
nwoolmer May 5, 2026
a3f9cfb
Clarify auto-include of timestamp on ALTER ADD INDEX
nwoolmer May 5, 2026
3b0df23
Distinguish filtered vs unfiltered LATEST ON in bitmap/posting compar…
nwoolmer May 5, 2026
83f84f5
Tighten .pci description and COUNT example comment
nwoolmer May 5, 2026
12abb60
Reflect auto-included timestamp in SHOW CREATE TABLE posting example
nwoolmer May 5, 2026
81f178a
Merge main and apply posting index config properties
javier May 6, 2026
5d68b3a
Address @javier review comments on posting/covering index docs
nwoolmer May 15, 2026
dca778d
Cover questdb master posting-index changes landed after the last PR push
nwoolmer May 15, 2026
deb1b5c
Tighten posting-index extras after re-reading @javier feedback patterns
nwoolmer May 15, 2026
c6c8233
Flag known async group-by / filter slowdown on the covering path
nwoolmer May 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 36 additions & 2 deletions documentation/concepts/deep-dive/indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,37 @@ Indexing is available for [symbol](/docs/concepts/symbol/) columns in both table
and [materialized views](/docs/concepts/materialized-views). Index support
for other types will be added over time.

QuestDB supports two index types:

| Index type | Syntax | Covering support | Best for |
|------------|--------|-----------------|----------|
| **Bitmap** (default) | `INDEX` or `INDEX TYPE BITMAP` | No | General-purpose, low write overhead |
| **Posting** | `INDEX TYPE POSTING` | Yes (via `INCLUDE`) | Read-heavy workloads, selective queries, wide tables |

See [Posting index and covering index](/docs/concepts/deep-dive/posting-index/)
for the detailed guide on the posting index and its covering query capabilities.

## Choosing an index type

| Feature | Bitmap index | Posting index |
|---------|-------------|---------------|
| Storage size | ~15 bytes/value | ~1 byte/value |
| Covering index (`INCLUDE`) | No | Yes |
| `DISTINCT` acceleration | No | Yes |
| Write overhead | Low | Low (without `INCLUDE`), moderate with `INCLUDE` |
| Filtered `LATEST ON` | Yes | Yes (covering path) |
| Unfiltered `LATEST ON` | Yes (`LatestByAllIndexed`) | Falls back to deferred-list scan |
| `CAPACITY` clause | Yes | No (parse error) |
| Syntax | `INDEX` or `INDEX TYPE BITMAP` | `INDEX TYPE POSTING` |

Use the **bitmap index** when you want a low-overhead general-purpose
index, or when your hottest query shape is unfiltered `LATEST ON …
PARTITION BY sym` (bitmap retains the edge there).

Use the **posting index** when reads dominate writes, queries are
selective on the indexed symbol, and you can list the columns you
typically select alongside the symbol in `INCLUDE` for covering reads.

## Index creation and deletion

The following are ways to index a `symbol` column:
Expand Down Expand Up @@ -97,6 +128,9 @@ Consider the following query applied to the above table

:::warning

Index capacity applies to **bitmap indexes only**. Posting indexes manage
their own storage layout and do not use this setting.

We strongly recommend to rely on the default index capacity. Misconfiguring this property might
lead to worse performance and increased disk usage.

Expand All @@ -114,8 +148,8 @@ When in doubt, reach out via the QuestDB support channels for advice.

:::

When a symbol column is indexed, an additional **index capacity** can be defined
to specify how many row IDs to store in a single storage block on disk:
When a symbol column has a bitmap index, an additional **index capacity** can be
defined to specify how many row IDs to store in a single storage block on disk:

- Server-wide setting: `cairo.index.value.block.size` with a default of `256`
- Column-wide setting: The
Expand Down
Loading
Loading