外观
本页尚未翻译
本页内容仍为英文原文,源自官方文档 enterprise/cache-prewarm。中文翻译正在分批进行中。
Cache Prewarm
Populate the tiered index cache ahead of a request, instead of filling it lazily on first read.
Applies to: Embedded ❌, Enterprise ✅
Cache Prewarm loads the tiered index cache a plan executor keeps as part of Enterprise's serving layer, instead of leaving it to fill lazily on first read. You configure which tables to prewarm; on startup, each plan executor loads those tables' indexes into cache before it joins the fleet. The executor does not accept queries until prewarming finishes, so it never serves a request against a cold cache.
LanceDB Embedded has no such cache, so there is nothing for it to warm there. 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.
mermaid
%%{init: {"theme": "base", "themeVariables": {
"background": "#ffffff", "primaryColor": "#ffffff", "primaryTextColor": "#221d19",
"primaryBorderColor": "#ad9e95", "lineColor": "#6b625c", "textColor": "#221d19",
"edgeLabelBackground": "#ffffff", "fontFamily": "Inter, sans-serif", "fontSize": "18px"
}}}%%
flowchart LR
List[("Configured list<br/>of tables to prewarm")]
Start["Plan executor starts<br/>(not ready — no queries served)"] --> Warm["Loads the configured<br/>tables' indexes into cache"]
List -.-> Warm
Warm --> Ready["Ready — joins the fleet,<br/>starts serving queries"]
classDef default fill:#ffffff,stroke:#ad9e95,stroke-width:1px,color:#221d19
classDef accent fill:#fff1ec,stroke:#e8582d,stroke-width:1.5px,color:#221d19
class Warm,List accentWhy 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.