Skip to main content
Enterprise only
Enterprise supports two kinds of cache prewarm: startup index prewarm fills the tiered index cache, and on-demand data prewarm fills the data page cache through a durable job. For startup index prewarm, you configure which tables to warm. Each executor loads those tables’ indexes before it joins the fleet. The executor does not accept queries until startup prewarming finishes. These Enterprise caches are not available in LanceDB Embedded. Embedded does have its own, separate prewarm_index() on a table — an idempotent hint that loads a built index into memory ahead of a query.

Why it matters

Without prewarming, a fresh or restarted executor would fill its indexes lazily, so the first queries it serves pay the cost of loading and deserializing them from object storage. Holding the executor out of the fleet until its configured tables are warm means every query it ever serves gets a warm cache, so performance stays consistent through restarts and rollouts instead of dipping right after each one. Contact us to learn more about how prewarming is configured for your deployment.

On-demand data prewarm

On compatible Enterprise deployments, the SDK submits data prewarm through SQL. Flight SQL connectivity is required; the existing generic HTTP job API is used to inspect or wait for the durable warming job. Under Standard authorization, submission requires table Select plus Usage on the database and namespace hierarchy. Job events require System Usage and cancellation requires System Operate. The table handle determines the database, namespace, and branch in every SDK.
The method returns when the job is accepted. Waiting finishes when warming reaches a terminal state; a timeout does not cancel the job. Use job.checkout_latest() and job.spec()["table_version"] to inspect the captured source version. In Python’s asynchronous API, await submission and job.wait(). The TypeScript SDK exposes table.prewarmDataAsync({ columns, filter, parameters, concurrency }) with the same lifecycle. Pass parameters alongside a filter to bind positional $1/$2 or named $name values. Python accepts a sequence, mapping, or one-row Arrow batch/table; TypeScript accepts a scalar array, named object, or one-row Arrow batch/table. Rust accepts a one-row Arrow RecordBatch. Values travel separately from SQL text, and table/column identifiers, branch, and concurrency retain their existing interfaces. Existing literal filters continue to work without parameters. Bound filters require an Enterprise server that supports parameterized PREWARM. The server accepts up to 1,024 scalar parameters and 64 KiB of encoded Arrow IPC. Missing, unused, malformed, oversized, and unsupported bindings fail before job creation. TypeScript encodes safe integer numbers and bigint as Int64 and fractional numbers as Float64; use Arrow input when an explicit type is needed. Waiting returns a typed PrewarmDataResult: the pinned source version, selected fragment count, targeted/completed executor counts, and partial executor count when reported. Completed executors include partial completions; executors_partial is that subset, which can reflect cache pressure. These are observations of executor work, not a guarantee that every page remains resident. Counters omitted by older workers stay unknown. The current executor status protocol does not report byte/range measurements for nonempty prewarms, so bytes_read and ranges_completed are None/null there. A new worker performing an empty plan reports known zero work. Progress exposes planning/dispatch phases, selected fragments, executor fan-out, and the latest active/completed/partial/failed executor counts without inventing percentages. In Python, job.wait(progress=True) displays completed executors. Pass a callback instead to inspect the full structured snapshots. The Enterprise administrative CLI supports the same lifecycle:
SQL submission and preview use the same options. Submission returns a job ID and pinned source version; preview creates no job:
The typed SDK preview helpers return a PrewarmDataPlan with the source table version, readable plan, and structured pruning summary. They require an Enterprise deployment supporting EXPLAIN (FORMAT JSON) PREWARM and Flight SQL connectivity. Preview requires table Select plus Usage on the database and namespace hierarchy; it creates no warming job and does not use the job-monitoring APIs.
With an AsyncTable, use await table.explain_prewarm_data(...) with the same arguments. It returns the same plan type.
The plan string is for display; use pruning for structured facts. Selected row ranges are conservative physical candidate intervals, not exact matching rows. Unavailable range counts remain None/null; a reported zero means no candidate ranges. The fallback reason describes why pruning was unavailable, when reported. Pruning modes may expand in future server versions. A preview does not reserve its snapshot: a later submission resolves and plans its own source version. Unsupported servers fail explicitly without falling back to text parsing or REST. Python’s SQL interface also accepts bindings for a preview without submitting a warming job:
The filter is a single SQL predicate used for conservative metadata pruning. Unknown or unavailable metadata keeps data eligible for warming. Omitted columns warm all fields; concurrency must be a positive integer. Historical version checkouts are unsupported: use the latest version of the selected branch. The server never needs to scan rows merely to evaluate the predicate. prewarm_data(columns, filter=..., parameters=..., concurrency=...) and prewarmData({ columns, filter, parameters, concurrency }) accept the same options as the job-returning methods but return after acceptance without retaining the handle. The existing TypeScript prewarmData(columns) array form remains supported. These methods require SQL PREWARM support and Flight SQL connectivity. Unsupported servers fail without a REST fallback or silently dropping options. Repeated submissions may create distinct jobs; warming already-cached data is safe. Index prewarm keeps its existing behavior.

What to read next

Data Page Cache

The raw-data-page cache populated by on-demand data prewarm jobs.

Tiered Index Cache

The deserialized-index cache populated by startup index prewarm.

Architecture

Where executors and query nodes sit in the serving fleet.