Qserv

active

by SLAC National Accelerator Laboratory / Vera C. Rubin Observatory · since 2011 · also known as LSST Qserv, Rubin Qserv, LSST Query Services

Distributed shared-nothing SQL database built to serve the Rubin Observatory's petascale sky catalogs.

relationalspatialdatabase engineopen source (copyleft)growing

Overview

Qserv is the catalog database of the Vera C. Rubin Observatory (LSST), developed at SLAC for more than a decade. A front-end 'czar' accepts MySQL-protocol queries, rewrites them into many per-chunk sub-queries and fans them out over XRootD to worker nodes that each run MariaDB on their slice of the data; results are merged and returned. Tables are partitioned spatially into sky chunks with a director table (such as Object) that keeps related rows co-located, so near-neighbour and object-to-source joins run without moving data. The SQL dialect is restricted (no subqueries, writes go through a separate ingest service) but adds spherical-geometry predicates via scisql. It is actively developed, but it is a purpose-built science system rather than a general database.

Strengths & trade-offs

Strengths

  • +Spatial chunking keeps related rows together so astronomy joins stay local to a worker
  • +Fans one SQL query out to thousands of chunk queries in parallel
  • +Speaks the MySQL protocol, so standard clients and TAP services connect directly
  • +Director index gives fast lookups by object ID across the whole catalog
  • +Open source and actively developed for a flagship survey

Trade-offs

  • −Restricted SQL: no subqueries, strict rules on spatial predicates and ORDER BY
  • −Data is loaded through a dedicated ingest workflow, not ordinary INSERT/UPDATE
  • −Small, domain-specific community; documentation assumes astronomy catalogs

Great for

  • +Serving petascale astronomical object and source catalogs
  • +Spatial cone and box searches over sky surveys
  • +Large read-mostly scientific tables partitioned by position

Think twice for

  • −Transactional applications
  • −General-purpose analytics outside spatially partitioned data
  • −Small teams wanting a turnkey warehouse

Capabilities

Native or official first-party support · 5 of 25 tracked

✓Joins
✓Secondary indexes
✓Geospatial
✓Durable persistence
✓Compression
–Transactions
–Full-text search
–Vector search
–JSON
–Change data capture
–Triggers
–Stored procedures
–Materialized views
–TTL / expiry
–Pub/Sub
–Columnar storage
–In-memory
–Encryption at rest
–Role-based access
–Time travel
–Branching
–Online schema changes
–Streaming ingest
–Offline sync
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Large · ≤ 1 PB
Horizontal scaling
Native
Multi-region
No
Transactions
Limited ACID
Consistency
Eventual
Schema
Strict
Architecture
Distributed, Client server
Query languages
SQL (Qserv dialect)

Built to hold the multi-billion-object Rubin catalogs across many worker nodes; spatial chunks with overlap let near-neighbour joins run without data movement.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

Ecosystem

compatible withMySQL
apis & protocolsMySQL wire protocol, HTTP query and ingest API, Asynchronous query API
client languagesPython, C++, Java

Alternatives to Qserv

Compare all→
ClickHouseColumnar / OLAP69.8

Open-source columnar OLAP database known for very fast aggregations over billions of rows.

qserv vs clickhouse →
GreenplumRelational20.7

PostgreSQL-based MPP data warehouse, closed-sourced by Broadcom in 2024 and sold in Tanzu Data.

qserv vs greenplum →
CitusRelational21.1

Postgres extension that shards tables across nodes for multi-tenant SaaS and real-time analytics.

qserv vs citus →
PostGISSpatial47.5

The standard spatial extension for PostgreSQL: geometry, geography, rasters and topology in SQL.

qserv vs postgis →
SciDBArray / Scientific3.7

Massively parallel array database co-designed by Michael Stonebraker; no longer actively offered.

qserv vs scidb →
rasdamanArray / Scientific3.9

Array database for massive multidimensional rasters, with SQL-style queries and OGC WCPS services.

qserv vs rasdaman →

Qserv FAQ

What is Qserv?

Qserv is a relational database by SLAC National Accelerator Laboratory / Vera C. Rubin Observatory, first released in 2011. Qserv is the catalog database of the Vera C. Rubin Observatory (LSST), developed at SLAC for more than a decade. A front-end 'czar' accepts MySQL-protocol queries, rewrites them into many per-chunk sub-queries and fans them out over XRootD to worker nodes that each run MariaDB on their slice of the data; results are merged and returned. Tables are partitioned spatially into sky chunks with a director table (such as Object) that keeps related rows co-located, so near-neighbour and object-to-source joins run without moving data. The SQL dialect is restricted (no subqueries, writes go through a separate ingest service) but adds spherical-geometry predicates via scisql. It is actively developed, but it is a purpose-built science system rather than a general database.

Is Qserv open source?

Yes. Qserv is open source. License: GNU General Public License v3.0.

Does Qserv support ACID transactions?

Partly. Qserv offers limited ACID guarantees (for example, single-record or single-partition transactions), with eventual consistency.

Does Qserv scale horizontally?

Qserv scales horizontally out of the box, with built-in sharding or partitioning. It is comfortable at large scale (≤ 1 PB).

How can I run Qserv?

You can self-host it.

What is Qserv best for?

Qserv is a strong fit for serving petascale astronomical object and source catalogs; spatial cone and box searches over sky surveys; and large read-mostly scientific tables partitioned by position. Think twice for transactional applications.

What are the best alternatives to Qserv?

Common alternatives to Qserv include ClickHouse, Greenplum, Citus, PostGIS and SciDB. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

How popular is Qserv?

Qserv ranks #610 of 844 databases on the WhichDB Score (0.8/100), and #188 among relational databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.