mirror of
https://github.com/lancedb/lancedb.git
synced 2026-10-16 16:52:34 +00:00
This PR is part of the documentation revamp. Once the full set of PRs is merged, we’ll publish the combined site to staging for review before updating docs.lancedb.com. The curation, SQL and operations pages contain outdated claims and examples that do not reliably work as written. This corrects those pages against the reviewed SDK and local server evidence, including prepared statements, background jobs, cleanup and monitoring. Integration guides are grouped with their examples in #4533. Function and Secret-object documentation stays unpublished until its release. The two Function pages are listed in `.mintignore` and left out of the navigation, and the sections about them on other pages are MDX comments. Stacked on #4533. Each MDX file has one PR owner. Rebase onto main after #4533 is squash-merged. Local assembly, Mint validation and link checks pass, and the assembled site shows no Function or Secret-object content. A local release rehearsal that uncomments the drafts and restores the navigation also passes. Hold publication until this PR and lancedb/sophon#8688 are on `main`.
35 lines
1.4 KiB
Plaintext
35 lines
1.4 KiB
Plaintext
---
|
|
title: "Views"
|
|
sidebarTitle: "View"
|
|
description: "A saved query, evaluated when read. The non-materialized counterpart to a materialized view."
|
|
icon: eye
|
|
keywords: ["view", "create view", "sql", "catalog"]
|
|
availability:
|
|
oss: unavailable
|
|
enterprise: available
|
|
summary: >-
|
|
Enterprise supports views when enabled for your Enterprise cluster; the embedded library cannot create them.
|
|
---
|
|
|
|
A view saves a query that you can refer to by name. Reading the view executes
|
|
that query against the source tables, using their read-consistency behavior.
|
|
Views do not store a separate copy of the result.
|
|
|
|
It is the counterpart to a
|
|
[materialized view](/management/materialized-view), which stores rows and is
|
|
brought up to date by a refresh. Both are [catalog objects](/basics/catalog)
|
|
defined by a query; choose a materialized view when you need to store and reuse the result.
|
|
|
|
| | View | Materialized view |
|
|
| --- | --- | --- |
|
|
| Stores | the query | the rows |
|
|
| Freshness | follows source-table reads | as of the last refresh |
|
|
| Read cost | executes the saved query | queries the stored result |
|
|
| Write cost | none | a refresh |
|
|
|
|
Views are created in LanceDB Enterprise, either in SQL over the
|
|
[Flight SQL endpoint](/sql#connecting) or with the SDKs' `create_view` /
|
|
`createView`, which send the query to the deployment. Either way, the deployment
|
|
must have views enabled. See [View](/sql/ddl/view) for `CREATE VIEW`,
|
|
`DROP VIEW`, and listing.
|