> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# table_bookmark_summary / _partitions / _references

> Reports active OlapTable bookmarks with inventory, captured partition versions, and current holders.

`information_schema.table_bookmark_summary`, `table_bookmark_partitions`, and
`table_bookmark_references` expose the active bookmark state on a database
cluster. A bookmark is an immutable record of an OlapTable's partition state
taken at a moment in time to pin partition versions for vacuum and
timestamp-based lookups.

Join the three tables on `(DB_ID, TABLE_ID, BOOKMARK_ID)`.

## table\_bookmark\_summary

**Bookmark inventory.** One row per active bookmark, with creation time, partition/reference counts, and at-a-glance aggregates (the 3 most recently changed partitions, the oldest and newest holder). The first table to query when you want to know what bookmarks exist on a table or in the cluster.

| Column | Type | Description |
| - | - | - |
| DB\_ID | BIGINT | Internal database id. |
| TABLE\_ID | BIGINT | Internal table id. |
| BOOKMARK\_ID | BIGINT | Bookmark id (unique within table). |
| CREATE\_TIME | DATETIME | When the bookmark was taken. |
| LOGICAL\_PARTITION\_COUNT | BIGINT | Logical partition count captured. |
| PHYSICAL\_PARTITION\_COUNT | BIGINT | Physical partition count captured. |
| REFERENCE\_COUNT | BIGINT | Current number of holders referencing this bookmark. |
| LATEST\_CHANGED\_PHYSICAL\_PARTITIONS | `ARRAY<STRUCT<id BIGINT, version BIGINT, time DATETIME>>` | Up to 3 physical partitions with the most recent `visible_version_time`, ordered descending by time. Ties broken by largest `physical_partition_id`. Empty array if the bookmark captured no partitions; shorter than 3 when fewer partitions exist. |
| OLDEST\_REFERENCE | `STRUCT<id VARCHAR, time DATETIME, ttl_ms BIGINT>` | Holder with the oldest current acquire time. Ties broken by lexicographically smallest holder id. `ttl_ms` is that holder's per-reference TTL in ms (`<= 0` means no per-reference limit; the cluster ceiling still applies). `time + ttl_ms` is not an expiry: a renewing holder stays alive past it — check `table_bookmark_references.LAST_RENEW_TIME`. |
| NEWEST\_REFERENCE | `STRUCT<id VARCHAR, time DATETIME, ttl_ms BIGINT>` | Holder with the most recent current acquire time. Same tie-break rule. `ttl_ms` is that holder's per-reference TTL in ms (`<= 0` means no per-reference limit; the cluster ceiling still applies). |

## table\_bookmark\_partitions

**Per-partition detail.** One row per (bookmark, physical\_partition), showing exactly which partition versions a bookmark pins. The table to query when debugging vacuum: join with `partitions_meta` on `physical_partition_id` to spot bookmarks that hold versions older than the live table.

| Column | Type | Description |
| - | - | - |
| DB\_ID, TABLE\_ID, BOOKMARK\_ID | (mirror summary) | Join keys. |
| LOGICAL\_PARTITION\_ID | BIGINT | Logical partition id. |
| PHYSICAL\_PARTITION\_ID | BIGINT | Physical partition id. |
| VISIBLE\_VERSION | BIGINT | The partition's visible version captured in this bookmark. |
| VISIBLE\_VERSION\_TIME | DATETIME | The wall-clock moment that visible version became visible. |
| BASE\_MATERIALIZED\_INDEX\_META\_ID | BIGINT | Base materialized index meta id at the bookmark moment. Changes on schema change / reshard. |
| BASE\_MATERIALIZED\_INDEX\_ID | BIGINT | Base materialized index id at the bookmark moment. |

## table\_bookmark\_references

**Per-holder detail.** One row per (bookmark, holder), showing who is currently keeping the bookmark alive and when they acquired it. The table to query when looking up bookmarks held by a specific materialized view or other holder.

| Column | Type | Description |
| - | - | - |
| DB\_ID, TABLE\_ID, BOOKMARK\_ID | (mirror summary) | Join keys. |
| HOLDER\_ID | VARCHAR | Holder identity. Materialized views encode as `mv:<dbId>-<mvId>`. |
| CREATE\_TIME | DATETIME | When this holder acquired the bookmark. Not moved by renewals. |
| TTL\_MS | BIGINT | Per-reference time-to-live in ms, set at acquire time and replaced by each `bookmark_renew`. The effective lease is the smaller of this and the cluster ceiling `bookmark_reference_max_ttl_ms`, where `<= 0` on either side means no limit -- so a reference with no TTL of its own still expires at the ceiling, and only a reference with neither never expires. Measured from `LAST_RENEW_TIME` when set, else from `CREATE_TIME`. |
| LAST\_RENEW\_TIME | DATETIME | When the holder last renewed its lease via `bookmark_renew`; NULL if never renewed. A reference is being kept alive by renewals, not stuck in the sweep, when `CREATE_TIME + TTL_MS` is past but `LAST_RENEW_TIME + TTL_MS` is not -- with a cluster ceiling set, expiry can come earlier than that sum. |

## Query patterns

### Inventory: list all bookmarks for a table

```sql theme={null}
SELECT * FROM information_schema.table_bookmark_summary
WHERE table_id = <table_id>;
```

### Vacuum debug: find partitions pinned by the oldest bookmark

```sql theme={null}
SELECT p.physical_partition_id, p.visible_version
FROM information_schema.table_bookmark_partitions p
JOIN information_schema.table_bookmark_summary s
  USING (db_id, table_id, bookmark_id)
WHERE s.table_id = <table_id>
ORDER BY s.create_time ASC
LIMIT 100;
```

### MV holder lookup: find bookmarks held by an MV

```sql theme={null}
SELECT * FROM information_schema.table_bookmark_references
WHERE holder_id = 'mv:1001-2003';
```

## Notes

* Rows are filtered by privilege: a user sees only bookmarks on tables they could `SELECT` from.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.