mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-26 12:33:59 +00:00
docs: clarify prewarm modes and publish SDK examples
This commit is contained in:
@@ -1060,8 +1060,8 @@ Prewarm one or more columns of data in the table.
|
||||
This will load the column data into the page cache so that future queries that
|
||||
read those columns avoid the initial cold-start latency. This call initiates
|
||||
prewarming and returns once the request is accepted; the warming itself may
|
||||
continue in the background. Calling it on already-prewarmed columns is a
|
||||
no-op on the server.
|
||||
continue in the background. Submission uses SQL PREWARM and needs Flight
|
||||
SQL connectivity. Use [prewarmDataAsync](Table.md#prewarmdataasync) to retain the job handle.
|
||||
Prewarming is generally useful for columns used in filters or projections.
|
||||
Large columns (e.g. high-dimensional vectors or binary data) may not be
|
||||
practical to prewarm.
|
||||
@@ -1073,6 +1073,44 @@ Prewarm one or more columns of data in the table.
|
||||
|
||||
***
|
||||
|
||||
### prewarmDataAsync()
|
||||
|
||||
```ts
|
||||
abstract prewarmDataAsync(options?): Promise<Job>
|
||||
```
|
||||
|
||||
Submit data prewarm through SQL and return its durable warming-job handle.
|
||||
|
||||
The table handle supplies the branch and namespace. Requires a compatible
|
||||
SQL PREWARM server and Flight SQL connectivity. Standard authorization
|
||||
requires table Select and database/namespace Usage. Status/wait use generic
|
||||
HTTP job APIs; events and cancellation retain their own privileges.
|
||||
No REST fallback or option-dropping retry is performed. Historical-version
|
||||
handles are unsupported; call `checkoutLatest()` first.
|
||||
|
||||
Submission returns after acceptance. Use `job.wait()` for completion, or
|
||||
save `job.id` and reopen it with `db.openJob(id)`. A timeout does not cancel
|
||||
the job. After `job.refresh()`, `job.spec.table_version` is the pinned version.
|
||||
|
||||
#### Parameters
|
||||
|
||||
* **options?**: [`PrewarmDataOptions`](../interfaces/PrewarmDataOptions.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Job`](Job.md)>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
const job = await table.prewarmDataAsync({
|
||||
columns: ["video"], filter: "quality > 0.7", concurrency: 4,
|
||||
});
|
||||
await job.wait();
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### prewarmIndex()
|
||||
|
||||
```ts
|
||||
|
||||
@@ -125,6 +125,7 @@
|
||||
- [OpenTableOptions](interfaces/OpenTableOptions.md)
|
||||
- [OptimizeOptions](interfaces/OptimizeOptions.md)
|
||||
- [OptimizeStats](interfaces/OptimizeStats.md)
|
||||
- [PrewarmDataOptions](interfaces/PrewarmDataOptions.md)
|
||||
- [QueryExecutionOptions](interfaces/QueryExecutionOptions.md)
|
||||
- [RTEStats](interfaces/RTEStats.md)
|
||||
- [RTEWriteSpec](interfaces/RTEWriteSpec.md)
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
[**@lancedb/lancedb**](../README.md) • **Docs**
|
||||
|
||||
***
|
||||
|
||||
[@lancedb/lancedb](../globals.md) / PrewarmDataOptions
|
||||
|
||||
# Interface: PrewarmDataOptions
|
||||
|
||||
Settings for submitting a durable remote data-cache prewarm job.
|
||||
|
||||
## Properties
|
||||
|
||||
### columns?
|
||||
|
||||
```ts
|
||||
optional columns: string[];
|
||||
```
|
||||
|
||||
Lance field paths to warm; omitted or empty means every column.
|
||||
|
||||
***
|
||||
|
||||
### concurrency?
|
||||
|
||||
```ts
|
||||
optional concurrency: number;
|
||||
```
|
||||
|
||||
Positive per-executor concurrency, at most 4294967295.
|
||||
|
||||
***
|
||||
|
||||
### filter?
|
||||
|
||||
```ts
|
||||
optional filter: string;
|
||||
```
|
||||
|
||||
A single SQL predicate for conservative metadata pruning.
|
||||
Reference in New Issue
Block a user