Skip to main content
SPQR is a PostgreSQL query router. Your application connects to it with its usual PostgreSQL client. The data lives on shards, each of which is a PostgreSQL database. Consider a messenger that stores messages by chat_id. When you open chat 42, the router reads that ID from the query and looks up which shard owns it. When you ask which chats a user has joined, the answer can span several shards. You can see both cases in the demo.

Run your first query

Start two shards on your laptop, open a chat, and see which shard answered.
Already have an empty SPQR cluster? Load the demo and try the same queries. For the reasoning behind the router and its focus on single-shard transactions, see Design Goals.