惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
大猫的无限游戏
大猫的无限游戏
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 司徒正美
美团技术团队
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
WordPress大学
WordPress大学
T
Tailwind CSS Blog
U
Unit 42
C
Check Point Blog
S
SegmentFault 最新的问题
Martin Fowler
Martin Fowler
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
腾讯CDC
罗磊的独立博客
小众软件
小众软件
Recent Announcements
Recent Announcements
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
DataBreaches.Net

Blog — PlanetScale

Keeping a Postgres queue healthy — PlanetScale Patterns for Postgres Traffic Control — PlanetScale Graceful degradation in Postgres — PlanetScale High memory usage in Postgres is good, actually — PlanetScale Stripe Projects partnership: Provision PlanetScale Postgres and MySQL databases from the Stripe CLI — PlanetScale Enhanced tagging in Postgres Query Insights — PlanetScale Behind the scenes: How Database Traffic Control works — PlanetScale Introducing Database Traffic Control — PlanetScale Scaling Postgres connections with PgBouncer — PlanetScale Drizzle joins PlanetScale — PlanetScale Video Conferencing with Postgres — PlanetScale Faster PlanetScale Postgres connections with Cloudflare Hyperdrive — PlanetScale Introducing the PlanetScale MCP server — PlanetScale Database Transactions — PlanetScale Automating our changelog with Cursor commands — PlanetScale Postgres 18 is now available — PlanetScale $50 PlanetScale Metal is GA for Postgres — PlanetScale AI-Powered Postgres index suggestions — PlanetScale $5 PlanetScale is live — PlanetScale Announcing Vitess 23 — PlanetScale $50 PlanetScale Metal — PlanetScale Report on our investigation of the 2025-10-20 incident in AWS us-east-1 — PlanetScale $5 PlanetScale — PlanetScale Benchmarking Postgres 17 vs 18 — PlanetScale Larger than RAM Vector Indexes for Relational Databases — PlanetScale Partnering with Cloudflare to bring you the fastest globally distributed applications — PlanetScale Processes and Threads — PlanetScale PlanetScale for Postgres is now GA — PlanetScale Postgres High Availability with CDC — PlanetScale Announcing Neki — PlanetScale
Using MotherDuck with PlanetScale — PlanetScale
Ben Dicken · 2025-12-16 · via Blog — PlanetScale

Ben Dicken [@BenjDicken] |

DuckDB has gained significant traction for OLAP workloads. It's powerful, flexible, and has a feature-rich SQL dialect, making it perfect to use for analytics alongside OLTP-oriented relational databases.

Today, we're excited to announce support for the pg_duckdb extension for Postgres databases on PlanetScale alongside our partnership with MotherDuck.

DuckDB in Postgres

DuckDB can be run as a standalone OLAP database, but also alongside Postgres via the pg_duckdb extension. The extension integrates DuckDB's column-store analytics engine right inside of Postgres, allowing you to seamlessly combine OLTP and OLAP queries over Postgres connections.

When enabled, tables can be created either using the standard Postgres table format or temporary tables in the DuckDB vectorized column format. Queries can then be selectively executed either using the Postgres engine or DuckDB. pg_duckdb can also be used to work with and query external datasources in popular formats like Apache Parquet and Iceberg.

Having DuckDB as a built-in extension makes data movement between Postgres and DuckDB formats simpler, and unifies the experience of combining analytics results with the rest of your relational data.

MotherDuck

Though DuckDB is extremely powerful, many prefer to separate analytical compute from OLTP compute. This is useful to ensure that heavy analytics queries don't negatively impact application performance, and vice-versa.

MotherDuck is a cloud data warehouse with deep integration and support for DuckDB, and is a perfect solution to this problem. The pg_duckdb extension supports offloading analytics queries to the MotherDuck cloud. Analytics queries can be executed from within your PlanetScale Postgres database, but the analytics query execution can be offloaded to your data sets stored in the MotherDuck cloud. The results can then be returned to Postgres for further processing.

To use DuckDB and MotherDuck together with your PlanetScale database:

  • Enable pg_duckdb via the "Extensions" table on the "Clusters" page of your database.

Enable pg_duckdb

  • Connect to your Postgres database and run GRANT CREATE ON SCHEMA public to pscale_superuser; to allow the addition of the MotherDuck catalog in Postgres and CREATE EXTENSION pg_duckdb; to create the extension.

  • Add your MotherDuck token with CALL duckdb.enable_motherduck('YOUR_TOKEN');

  • Start running your analytics queries!

Check out our docs and the MotherDuck docs for more information on how to use pg_duckdb with MotherDuck.