LanceDB Embedded vs PyLance

LanceDB Embedded is the open-source LanceDB library that runs inside your application process. PyLance is the low-level Python SDK for the Lance format that both are built on.

Short answer

Start with LanceDB Embedded for applications and data pipelines. It organizes Lance tables in a catalog and adds a compute engine, automatic embedding generation, hybrid search, reranking, and training data loading. It runs in your application process and offers Python, TypeScript, and Rust SDKs.

Use PyLance for direct control over Lance dataset files, versions, and indexes. It is useful when you already orchestrate your own distributed writes or index builds. You can also start with LanceDB Embedded and call table.to_lance() to access the underlying dataset when a job needs that lower-level API.

At a glance

Compare storage, search, and training. On smaller screens, scroll sideways to see all columns.

Feature
LanceDB Embedded
PyLance
Primary role
Open-source library that runs inside your application
Low-level Python SDK for the Lance format
Abstraction
Catalog of Lance tables with a compute engine
Direct control over dataset files, versions, and indexes
License
Apache 2.0
Apache 2.0
Languages
Python, TypeScript, Rust
Python
Data format
Lance tables organized in a database directory
Lance datasets that LanceDB and Spark can also read
Storage
Local disk, S3, Google Cloud Storage, Azure Blob Storage
Local disk, S3, Google Cloud Storage, Azure Blob Storage
Writes
Large writes can use automatic parallelism with table.add(). Update, merge, and delete rows.
Write datasets directly or write and commit fragments from your own distributed jobs.
Hybrid search
Combines vector search and BM25 with Reciprocal Rank Fusion by default
Separate vector and BM25 full-text search APIs
Reranking
Built-in and custom rerankers
Application code handles reranking
Embeddings
Configured embedding functions generate vectors on insert
Application code generates embeddings
Filtering
SQL expressions for scans, vector search, full-text search, and hybrid search, with scalar indexes and pre- or post-filtering
SQL filter pushdown with pattern matching, regular expressions, and nested field access
Versioning
Table versions, time travel, tags, and branches
Dataset versions, tags, and branches
Schema evolution
Add derived columns without rewriting existing media, including SQL-derived features and embeddings filled on insert
Add, alter, or drop columns and define backfills with SQL expressions or Python functions
Images, video, and audio
Store binary data beside metadata and embeddings. The Blob API can load large objects on demand.
Blob columns support lazy, file-like reads.
Training data
PyTorch Dataset support and resumable, shuffled loading with StreamingDataset
PyTorch IterableDataset with sharded samplers
Scaling out
Move to LanceDB Enterprise without converting data
Use fragment write APIs or Ray and Spark integrations with your own orchestration

What is the difference between LanceDB Embedded and PyLance?

The Lance format defines how data and indexes are stored. PyLance exposes those format-level operations in Python. LanceDB adds a compute engine and a catalog for organizing and querying multiple Lance tables. LanceDB Embedded runs inside the application process, so a local installation needs no separate database server.

Terminology

PyLance calls a Lance table a dataset and creates it with lance.write_dataset(). LanceDB calls it a table and uses namespaces to organize tables and other namespaces.

Can LanceDB Embedded and PyLance work on the same data?

Yes. A Lance table created with one library can be opened with the other. For tasks that need the lower-level dataset API, call table.to_lance() from a LanceDB Embedded table. For example, you can stream batches with filters pushed down to the dataset. Distributed index builds in PyLance expose the needed APIs and leave worker scheduling and coordination to you.

What does LanceDB Embedded add on top of PyLance?

  • The embedding function registry can automatically generate vectors on insert using providers such as OpenAI, Cohere, and Hugging Face.
  • Hybrid search combines vector similarity and BM25 on the same table. It uses Reciprocal Rank Fusion by default and applies the same SQL filter to both searches.
  • Built-in rerankers include RRF and model-based options. You can also add a custom reranker.
  • Python, TypeScript, and Rust SDKs and namespace-based table organization support application development.
  • Large materialized writes passed to table.add() are automatically partitioned.
  • StreamingDataset adds prefetching, deterministic shuffling, resumable loading, and multithreaded transforms.
  • The client can move from an embedded path to a distributed LanceDB Enterprise deployment using a db:// URI. Both editions use the same Lance format.

When should you use PyLance directly?

Use PyLance when your job needs format-level controls. Examples include writing fragments in parallel from Slurm or Kubernetes before committing them together, orchestrating distributed index builds with your own scheduler, and selecting the file-format version when writing data. Keep the rest of an application on LanceDB Embedded and access the underlying dataset with table.to_lance() as needed.

How do search features compare?

Both support IVF-based vector indexes with quantization and HNSW variants, and both rank full-text results with BM25. LanceDB adds a unified hybrid search and reranking workflow, plus embedding generation on insert. Its full-text search supports configurable tokenizers, language stemming, phrase and fuzzy search, and structured Boolean queries.

Both support SQL filters, including pattern and regular-expression matching. In LanceDB, the same filter syntax works for vector, full-text, hybrid, and plain queries, with pre- or post-filtering available for search.

Which is better for ML training data, LanceDB Embedded or PyLance?

A LanceDB table can go directly into a PyTorch DataLoader. LanceDB's StreamingDataset handles deterministic shuffling, prefetching, multithreaded transforms, and restarts. It can read only selected columns and rows that match a filter. Use table versions and tags to record the data behind each checkpoint, and use vector or full-text search to curate hard negatives and duplicate clusters.

PyLance provides a PyTorch IterableDataset and samplers for sharded training. Use the spawn multiprocessing start method with Lance. Both libraries can add derived features alongside raw media without rewriting existing media columns. LanceDB can generate embedding columns automatically on insert, while PyLance lets you define each backfill with a SQL expression or Python function.

Feature engineering in LanceDB Enterprise

LanceDB Functions is an Enterprise capability. Run Python UDFs over a table to compute features or embeddings. Distributed backfills can checkpoint progress, process only changed data, target filtered rows, and refresh columns automatically. Chunkers can split videos, documents, or images into multiple rows. Batch UDTFs can deduplicate, cluster, or aggregate records. Materialized views support incremental refreshes for expensive computed features and training layouts.

Enterprise also provides built-in embedding and generation UDFs, primary-key bulk loading from external files, lazy access to blob columns, and configurable error handling. Managed execution packages dependencies, runs jobs, and reports their progress in the console. LanceDB Embedded tables can migrate to Enterprise without a format conversion.

Which should you choose?

Choose LanceDB Embedded for applications and data pipelines

  • You want automatic embeddings, hybrid retrieval, or reranking.
  • Your application uses TypeScript or Rust as well as Python.
  • You want resumable, shuffled training data loading from the same tables you search.
  • You need a path to a distributed Enterprise deployment without converting your data.

Choose PyLance for low-level format work

  • You need Python access to dataset files, versions, and indexes.
  • Your own scheduler coordinates distributed jobs that write and commit fragments.
  • You need to integrate Lance's distributed index build APIs into existing orchestration.

Frequently asked questions

Is PyLance the same as LanceDB?

PyLance is the Python SDK for direct access to the Lance format. LanceDB builds on that format and adds a table catalog, compute engine, and application-level APIs.

Can LanceDB open a dataset written with PyLance?

Yes. Both libraries use the Lance format and can open tables created by the other.

What is import lance?

Install the PyLance package with pip install pylance and use import lance. Install LanceDB Embedded with pip install lancedb and use import lancedb.

How do I get the Lance dataset behind a LanceDB table?

Call table.to_lance() on a LanceDB Embedded table to access the underlying dataset. This API is available on LanceDB Embedded tables. Enterprise uses the RemoteTable API.

Does PyLance do hybrid search?

PyLance provides vector search and BM25 full-text search APIs. LanceDB Embedded combines both in one hybrid query and defaults to Reciprocal Rank Fusion.

Can I use LanceDB as a PyTorch data loader?

Yes. Pass a LanceDB table to a PyTorch DataLoader as a Dataset. Use StreamingDataset for shuffled, prefetched, and resumable loading with either LanceDB Embedded or LanceDB Enterprise.

Try LanceDB

Start with LanceDB Embedded on your laptop. Talk to us about LanceDB Enterprise when you need a distributed deployment.

Talk to us