mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-26 12:33:59 +00:00
The Enterprise feature name was inconsistently written as "Real Time Engine" and "real time engine". Standardize it to **Realtime Engine** in eight website guides, including page and sidebar titles, descriptions, prose, link labels, cards, and search keywords. The remaining MemWAL references describe Lance's open source format or literal API/job identifiers, including `memwal_compaction` and `memwal_catchup_<type>`, and are preserved. Only `docs/web/*.mdx` pages change; SDK source, generated API reference, code examples, URL destinations, and section anchors are unchanged. Validation: - `git diff --check` passes. - Reviewed all MemWAL and Realtime Engine references under `docs/`. - Verified each changed file differs only by the intended naming substitutions and preserves code blocks, inline code, links, anchors, and MemWAL identifiers. - Confirmed no split or hyphenated "real time engine" names remain in website guides. - No snippets needed regeneration because code examples are unchanged. Vale and Mintlify are not installed locally, so their checks were not run locally.
85 lines
4.1 KiB
Plaintext
85 lines
4.1 KiB
Plaintext
---
|
|
title: "RTE reads"
|
|
sidebarTitle: "RTE Read"
|
|
description: "Query a table with the Realtime Engine enabled and get writes back within milliseconds of being written, merged transparently with the base table."
|
|
icon: "magnifying-glass"
|
|
keywords: ["rte", "realtime engine", "real time search", "real time query", "fresh reads", "memwal", "upsert"]
|
|
availability:
|
|
embedded: available
|
|
enterprise: available
|
|
---
|
|
|
|
A table with the [Realtime Engine](/tables/realtime-engine) enabled queries
|
|
the same way as any other table — nothing about `search`, filtering, or SQL
|
|
changes. This page covers what you get back; for enabling RTE and writing to
|
|
a table, see [RTE writes](/ingestion/realtime-write). For how Enterprise
|
|
combines these results across machines, see
|
|
[Distributed RTE Read](/enterprise/distributed-real-time-read).
|
|
|
|
## Query a real time table {#query}
|
|
|
|
Every query runs against the base table and the fresh tier (unflushed
|
|
memtables and SSTables) in parallel, and the two are merged into one result.
|
|
Fresh rows supersede base rows with the same primary key, so a row written a
|
|
moment ago is already reflected:
|
|
|
|
<CodeGroup>
|
|
```python Python icon="python"
|
|
# continuing the `frames` table connected and written to in RTE writes
|
|
import numpy as np
|
|
|
|
query_vector = np.random.rand(frames.schema.field("embedding").type.list_size).astype("float32")
|
|
|
|
frames.search(query_vector, vector_column_name="embedding").limit(10).to_list()
|
|
frames.search("gripper closing on a cup", fts_columns="caption").limit(10).to_list()
|
|
```
|
|
</CodeGroup>
|
|
|
|
By default every index on the table is RTE-maintained, re-read as the table
|
|
changes, so a new index is picked up automatically; pin a smaller set with
|
|
`RTEWriteSpec.with_maintained_indexes`. For full-text and scalar (BTree,
|
|
bitmap) indexes, a maintained index covers every tier -- base table,
|
|
SSTables, and the active memtable -- so a query rejects outright rather than
|
|
silently skipping un-compacted rows if a resident memtable predates the
|
|
index. Vector (ANN) search is maintained on the base table and SSTables the
|
|
same way, and the active memtable builds its own in-memory HNSW graph as
|
|
rows land, so writes stay vector-searchable within milliseconds too,
|
|
without waiting on a freeze into an SSTable. That graph search steps aside
|
|
for a full scan of the memtable only when it can't honor the query through
|
|
a graph -- a prefilter, a primary-key override, a distance lower bound, or
|
|
before the memtable has any index yet on a cold start.
|
|
|
|
## Embedded: one process, one dataset {#embedded}
|
|
|
|
LanceDB Embedded runs this same LSM scanner directly against the local Lance
|
|
dataset, in-process -- the identical merge-by-primary-key logic, the same
|
|
maintained-index rules for vector, full-text, and scalar search, just with no
|
|
network hop to a separate serving tier. There is no WAL node to route to and
|
|
nothing to combine across machines: a query against an RTE-enabled Embedded
|
|
table already reads the fresh tier together with the base table in one call.
|
|
See [Distributed RTE Read](/enterprise/distributed-real-time-read) for
|
|
what Enterprise adds on top when that fresh tier is served by a separate
|
|
machine from the one answering the rest of the query.
|
|
|
|
Not every query shape runs through the LSM scanner -- a query that asks for
|
|
`with_row_id`, time travel, multiple query vectors, hybrid search, or a
|
|
handful of other combinations is rejected with a clear error asking you to
|
|
set `use_rte(False)` and read the base table only, rather than silently
|
|
returning a result that omits un-compacted rows.
|
|
|
|
## Limitations {#limitations}
|
|
|
|
<Note>
|
|
Support for all table operations on RTE tables is coming soon. Time travel,{/* Draft until branching reaches early access: restore " branching," */}
|
|
`count_rows`, row IDs (`with_row_id`), and `TABLESAMPLE` are not yet
|
|
available.
|
|
</Note>
|
|
|
|
## Next steps {#next-steps}
|
|
|
|
- [RTE writes](/ingestion/realtime-write) — enable RTE and write to a table
|
|
- [Distributed RTE Read](/enterprise/distributed-real-time-read) — combining results across machines in Enterprise
|
|
- [How the Realtime Engine works](/tables/realtime-engine#memwal-format)
|
|
- [Hybrid search](/search/hybrid-search)
|
|
- [Vector search](/search/vector-search)
|