duckdb / pg_duckdb

DuckDB-powered Postgres for high performance apps & analytics.
MIT License
1.23k stars 47 forks source link

Add EXPLAIN ANALYZE support #136

Closed JelteF closed 4 weeks ago

JelteF commented 4 weeks ago

This adds support for forwarding EXPLAIN ANALYZE to DuckDB.

A useful side-effect for debugging issues of running EXPLAIN ANALYZE, is that it shows the actual query that was executed in duckdb.

mkaruza commented 4 weeks ago

Can we have test for this?

JelteF commented 4 weeks ago

Since the EXPLAIN ANALYZE output contains timings, which afaict are not possible to turn off in duckdb, the output of EXPLAIN ANALYZE wouldn't be stable. So I think we should merge this without tests.

As a separate PR I'll look into copying over and modifying the testing framework that I built for PgBouncer though. It should be very easy to test with that, and we'll probably find more cases where pgregress isn't flexible enough for the thing that we want to test.