Skip to content

Pixeltable vs Neon

Updated

Which is better, Pixeltable or Neon?

It depends. For an AI app, Pixeltable: it stores the rows, the media references, and the embeddings, runs the models, and serves the API from one Python schema, which replaces Neon plus pgvector plus the workers around them. Neon is the better pick when you need a copy-on-write database branch per pull request or scale-to-zero pricing. As of 2026-10-19.

Neon is an exceptional serverless Postgres: instant database branching, scale-to-zero compute, and separation of storage and compute. Pixeltable is an AI data infrastructure engine: multimodal column types, declarative computed columns, automatic embedding index maintenance, and built-in API serving. For an AI app, Pixeltable replaces Neon plus pgvector plus the workers around them: rows, media, and embeddings transform on insert in one schema. Neon still wins on copy-on-write branches and scale-to-zero pricing.

pip install 'pixeltable[serve]'
See how it works

Relational storage vs AI dataflow

SidePixeltableNeon
At a glance
  • Multimodal types (pxt.Image, pxt.Audio, pxt.Video, pxt.Document) validated and stored natively
  • Computed columns execute Whisper, CLIP, and sentence transformers in-engine on insert
  • EmbeddingIndex declared directly on table classes with automated incremental synchronization
  • FastAPIRouter declared alongside tables; zero glue code for production HTTP endpoints
  • Full PostgreSQL compatibility with standard SQL dialect, foreign keys, and extensions (pgvector)
  • Instant copy-on-write database branching for CI/CD, testing, and isolated staging environments
  • Scale-to-zero autoscaling compute saves costs during idle periods on development databases
  • Requires external Celery/Airflow workers, S3 storage, and manual backfill scripts for AI transforms

What actually differs

Neon excels at serverless Postgres elasticity, instant copy-on-write branching, and scale-to-zero pricing. Pixeltable excels when unstructured media requires automated transformation pipelines, incremental recomputation, and vector indexing in the schema.

FeaturePixeltableNeon
Core architecture
Application schema with DAG transformation engine & serving
Serverless relational PostgreSQL with separated storage & compute
Multimodal types
Native types (pxt.Audio, Video, Image, Document) with caching & validation
Raw bytea / text columns or external S3 URL references
AI pipeline orchestration
Built-in declarative computed columns; insert runs transformation DAG
External orchestrator required (Airflow, Celery, Temporal)
Embedding index maintenance
Declared on table class; updates incrementally and atomically on insert
Manual embedding generation and pgvector INSERT / UPDATE scripts
Model evolution & backfills
Change the embedder in the schema; pxt schema update rebuilds the index in place over every row
ALTER TABLE + custom batch Python backfill script + downtime risk
Database branching
Schema versioning & lineage tracking; no instant physical branch
Instant copy-on-write branching in seconds via storage engine
PostgreSQL compatibility
Postgres storage backend via SDK abstraction
Native Postgres 15/16; full SQL, foreign keys, triggers, and extensions
HTTP API serving
FastAPIRouter in the same Python file
Database only; requires standalone backend (FastAPI, Next.js, Express)
Free plan tier
Community (free): up to 1 vCPU · 2 GB per database or service, with enough compute for about a 0.5 vCPU · 1 GB database running all month; past that, databases and services stop until the 1st (UTC); 50 GB media and 10 GB database storage. Stops after 3 idle days; a catalog or service request starts it
1 GB storage per project, 100 projects, 100 CU-hours/mo, scale-to-zero compute

Document RAG: Chunking, embeddings & vector index

Pixeltable: Views chunk documents and indexes update incrementally on write. Neon: Requires DDL, an external script to chunk and embed, and manual pgvector upsert logic.

Pixeltable

import pixeltable as pxt
from pixeltable.functions.document import document_splitter
from pixeltable.functions.huggingface import sentence_transformer
TableModel = pxt.model_base()
embed = sentence_transformer.using(
model_id='sentence-transformers/all-MiniLM-L6-v2'
)
class Docs(TableModel, name='docs'):
document: pxt.Document
title: pxt.String
class Chunks(
TableModel,
name='chunks',
base=Docs,
iterator=document_splitter(Docs.document, separators='sentence,token_limit', limit=512),
):
__indexes__ = [pxt.EmbeddingIndex(text, embedding=embed)]
# Apply schema & insert: transforms and embeddings run automatically
# pxt schema update app.py rag
docs = pxt.get_table('rag.docs')
docs.insert([{'document': 'annual_report.pdf', 'title': '2025 Annual Report'}])
# Query vector similarity in-engine
chunks = pxt.get_table('rag.chunks')
sim = chunks.text.similarity(string='operating margin growth')
results = chunks.order_by(sim, asc=False).limit(5).select(chunks.text, chunks.title)

Neon

# 1. Database schema in Neon
# CREATE EXTENSION IF NOT EXISTS vector;
# CREATE TABLE docs (id UUID PRIMARY KEY, title TEXT, s3_url TEXT);
# CREATE TABLE doc_chunks (id UUID PRIMARY KEY, doc_id UUID, text TEXT, embedding vector(384));
import fitz # PyMuPDF
from sentence_transformers import SentenceTransformer
import psycopg2
from psycopg2.extras import execute_batch
model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
conn = psycopg2.connect("postgresql://neondb_owner:[email protected]/neondb")
def ingest_document(doc_id, title, pdf_path):
doc = fitz.open(pdf_path)
chunks = [page.get_text() for page in doc]
embeddings = model.encode(chunks)
with conn.cursor() as cur:
cur.execute("INSERT INTO docs VALUES (%s, %s, %s)", (doc_id, title, pdf_path))
rows = [(str(uuid.uuid4()), doc_id, c, e.tolist()) for c, e in zip(chunks, embeddings)]
execute_batch(cur, "INSERT INTO doc_chunks VALUES (%s, %s, %s, %s)", rows)
conn.commit()
# Plus: Celery task runner, S3 download glue, retry on network failure...

Changing the embedding model on live data

When you change the embedding model, pxt schema update replaces the index and embeds every existing row with the new model. Neon requires an ALTER TABLE, custom migration script, and pagination to avoid timeouts.

Pixeltable

# Update embedder in app.py:
new_embed = sentence_transformer.using(model_id='BAAI/bge-small-en-v1.5')
class Chunks(
TableModel,
name='chunks',
base=Docs,
iterator=document_splitter(Docs.document, separators='sentence,token_limit', limit=512),
):
__indexes__ = [pxt.EmbeddingIndex(text, embedding=new_embed)]
# Run: pxt schema update app.py rag --allow-destructive
# The changed index is dropped and re-created; every existing chunk
# is embedded with the new model, without duplicating rows or manual scripts.

Neon

# 1. Neon DDL migration
# ALTER TABLE doc_chunks ADD COLUMN new_embedding vector(384);
# 2. Write and run custom backfill script
new_model = SentenceTransformer('BAAI/bge-small-en-v1.5')
batch_size = 100
offset = 0
while True:
with conn.cursor() as cur:
cur.execute("SELECT id, text FROM doc_chunks WHERE new_embedding IS NULL LIMIT %s", (batch_size,))
rows = cur.fetchall()
if not rows:
break
ids, texts = zip(*rows)
vectors = new_model.encode(list(texts))
update_data = [(v.tolist(), i) for v, i in zip(vectors, ids)]
execute_batch(cur, "UPDATE doc_chunks SET new_embedding = %s WHERE id = %s", update_data)
conn.commit()
# Risk: transaction timeouts, connection drops, and drift between old and new columns.

When to choose which platform

Choose Pixeltable when

  • Multimodal AI is your core product

    Audio, video, PDFs, and embeddings. Pixeltable automates chunking, transcription, and indexing in one Python schema.

  • You want to eliminate pipeline glue code

    Replacing external orchestrators (Airflow, Celery) and backfill scripts with declarative computed columns.

  • You need Python-native ML integration

    Direct integration with PyTorch, Whisper, Hugging Face, OpenAI, and Anthropic without microservice hops.

Choose Neon when

  • Your schema leans on foreign keys and hand-written SQL

    Many relational tables tied together by foreign-key constraints and complex SQL joins, the work Postgres was built for.

  • You need preview environment database branches

    Neon instant copy-on-write database branching allows every pull request to have an isolated staging database.

  • You want scale-to-zero serverless pricing

    Development and preview databases spin down when idle, minimizing hosting costs for multi-tenant Postgres.

Making the right choice

  • Moving from Neon

    • Declare each table as a TableModel class in app.py and create it with pxt schema update.
    • Copy existing rows in with pxt.io.import_sql(..., if_exists="append"), which streams them from a SQLAlchemy connection into the tables pxt schema update created.
    • Replace pgvector columns and queries with an EmbeddingIndex on the source column and .similarity() in a query; embeddings are computed on insert.

Frequently asked questions

Is Pixeltable a replacement for Neon?

For multimodal AI applications, document RAG, and media processing, Pixeltable replaces the combination of Neon, pgvector, and external orchestrators. Neon still wins on copy-on-write branches and scale-to-zero pricing.

How do Neon and Pixeltable handle vector search?

Neon uses the pgvector PostgreSQL extension, requiring manual embedding calculation and SQL queries. Pixeltable provides built-in EmbeddingIndex declarations where embeddings are computed automatically on write and synchronized with source columns.

Can Neon run video or audio processing in SQL?

No. PostgreSQL does not run ffmpeg, Whisper, or computer vision models. Media processing with Neon requires external worker services. Pixeltable executes media decoders and ML models directly as computed columns.

What are the free plan limits?

Neon offers 1 GB storage per project, up to 100 projects, and scale-to-zero compute. Pixeltable Cloud's free Community plan runs up to 1 vCPU · 2 GB per database or service, with enough compute for about a 0.5 vCPU · 1 GB database running all month; past that, databases and services stop until the 1st (UTC), and includes 50 GB media and 10 GB database storage. A database with no activity for 3 days stops, its services with it, and nothing is deleted; the next request to its catalog or one of its services, or pxt db start, starts it again in about 2 minutes.

The pipeline is the schema. Insert a row, transforms run.

Declare tables and computed columns in app.py. Apply with pxt schema update. No Airflow, Celery, or backfill scripts required.

pip install 'pixeltable[serve]'
See how it worksGet expert guidance