build faster apps

With DuckDB-Powered Postgres

MIT license

Oops! Something went wrong while submitting the form.

Limited-Time Offer: Claim 100 free compute hours

quack
quack

my data is
my temple

try the
hy-bird
data stack

🦆 🚀
apps that fly

veni 🏃
vidi 👁
quacki 🦆

what did you
get done
this week?

Built with friends

Open Source Supporters

Platinum Supporters

Gold Elite Supporters

Silver Supporters

"A good start is half the battle" - Aristotle

MIT open source license

Laptop to cloud scale

Copy to S3 (parquet, csv)

Zero dependencies

Feature-rich SQL

Columnar-vectorized query engine

Making apps Fly Faster with

millisecond response times.

Hydra embeds DuckDB's state of the art analytics
engine into standard Postgres.

-- Get the average value of 100M rows SELECT AVG(UserID) FROM hits;
import psycopg2 from urllib.parse import urlparse # Example PostgreSQL database URL db_url = "postgresql://username:password@hostname:5432/database_name" # Parse the database URL url = urlparse(db_url) try: # Establish a connection to the PostgreSQL database using the URL connection = psycopg2.connect( database=url.path[1:], user=url.username, password=url.password, host=url.hostname, port=url.port ) # Create a cursor to perform database operations cursor = connection.cursor() # Run query cursor.execute("SELECT AVG(UserID) FROM hits") value = cursor.fetchone() print("Value: ", value) # Close the cursor and connection cursor.close() connection.close() except (Exception, psycopg2.Error) as error: print("Error while connecting to PostgreSQL:", error) finally: # Close connection, if it was opened if connection: connection.close()
import { drizzle } from 'drizzle-orm/postgres-js' import postgres from 'postgres' const hits = pgTable('hits', { userId: bigint('userID', { mode: 'number' }) }) const connectionString = process.env.DATABASE_URL const client = postgres(connectionString) const db = drizzle(client); const avg = await db .select({ avg: sql`avg(${hits.userId})`, }) .from(hits)
const { Pool } = require('pg'); const pool = new Pool({ connectionString: process.env.DATABASE_URL }); // Example usage (async () => { const query = 'SELECT AVG(UserID) AS avg FROM hits'; const client = await pool.connect(); const res = await client.query(query); console.log(res[0].avg); client.release(); await pool.end(); })();
import java.sql.Connection; import java.sql.DriverManager; import java.sql.Statement; import java.sql.ResultSet; import java.sql.SQLException; import java.math.BigInteger; public class PostgresExample { private static final String URL = System.getenv("DB_URL"); private static final String USER = System.getenv("DB_USER"); private static final String PASSWORD = System.getenv("DB_PASSWORD"); public static void main(String[] args) { // Connect to the PostgreSQL database try (Connection connection = DriverManager.getConnection(URL, USER, PASSWORD)) { String querySQL = "SELECT AVG(UserID) as avg FROM hits;"; try (ResultSet resultSet = statement.executeQuery(querySQL)) { while (resultSet.next()) { BigInteger avg = resultSet.getInt("avg"); System.out.printf("Average: %d", avg); } } } } catch (SQLException e) { System.out.println("Connection failure."); e.printStackTrace(); } } }
ARCHITECTURE

Query all the things

1. Connect with Object Storage (S3, Cloudflare R2, Google GCS, Azure..)
2. > COPY TO parquet format
3. Query and JOIN with Postgres row-based tables
4. Set views & materialized views

view QuickStart

Hannes Mühleisen

Founder & CEO, DuckDB Foundation & DuckDB Labs

We're excited to see DuckDB coming to the PostgreSQL ecosystem with pg_duckdb. DuckDB's powerful analytical query processing capabilities nicely complement Postgres' strengths in transactional workloads.

Pete Hunt

Founder & CEO, Dagster

"Building on top of Postgres, we’ve been looking for ways to boost and scale analytical query performance. Using DuckDB execution in Postgres with pg_duckdb will be a game changer."

Tom Hacohen

Founder & CEO, Svix

"Having the same database handle both normal and analytics workloads is a game changer. No more syncing data to a separate database!"

Owain Brennan

Founder & CEO, SeerBi

"The pg_duckdb project is really exciting for us as a maritime data science lab. We can significantly increase the speed of our queries on our huge shipping datasets and it builds the analytics DB directly into the app database - this makes client handover simple."

Ovais Tariq

Founder & CEO, Tigris Data

"DuckDB-Powered Postgres is exciting! We think it can have a major impact on how users store and access data. Excellent work."

Harold Gimenez

SVP Engineering, HashiCorp

"Hydra makes exploration and analysis of large amounts of data accessible and familiar. Being built on Postgres and DuckDB, it’s standing on a proven technical foundation."

James Arthur

Founder & CEO, ElectricSQL

"As the marriage of Postgres and DuckDB, pg_duckdb unlocks the ability for local-first software to analyse data quickly, in place, without sending it half way round the cloud and back."

Jordan Tigani

Founder & CEO, MotherDuck

"pg_duckdb adds the power of the fastest growing analytical database to the fastest growing transactional one. Postgres with 100% more ducks, what's not to like?"
Changelog

What we shipped
since March 2024

Oops! Something went wrong while submitting the form.

Pricing

Hydra is free and open-source (MIT)
You can still make your contribution!

“Hydra's columnar Postgres just works. We've run on Hydra for a year now without tuning performance. Great service!

Jose Tomos Lobos
at
Mono

“We are building the foundation of our analytics stack around Postgres. Hydra is a no-brainer and our data compressed by 5X."

Gary Sahota
at
Tether Data

“Hydra is a very well documented open source solution, and has an incredibly engaged team. They’ve always been welcoming to both paying and open source users through Github and Discord, and are quick to address any issues you encounter during and after implementation."

Lacrius
at
Hydra open source user

“Onboarding was done in one call, JD and Joseph are super helpful!”

Kevin Joo
at
Operator

”Hydra makes exploration and analysis of large amounts of data accessible and familiar. Being built on Postgres, it’s standing on a proven technical foundation."

Harold Gimenez
at
HashiCorp

“Hydra is a great solution for our database needs. It is efficient, fast, reliable and easy to integrate - without the hassles of big enterprise databases. Great tech support and overall great success.”

Amod Kumar
at
Cure