explain_ui
explain_ui
pg_explain_ui : easily jump into a visual plan UI for any SQL query
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 6540 | explain_ui | pg_explain_ui | 0.0.2 | STAT | PostgreSQL | Rust |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
--s-d-- | No | Yes | No | Yes | no | no |
| Relationships | |
|---|---|
| See Also | pg_show_plans auto_explain pg_stat_statements pg_hint_plan pg_qualstats pg_store_plans pg_profile powa |
manual updated pgrx by Vonng
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.0.2 | 18 17 16 15 14 | pg_explain_ui | - |
| RPM | PIGSTY | 0.0.2 | 18 17 16 15 14 | pg_explain_ui_$v | - |
| DEB | PIGSTY | 0.0.2 | 18 17 16 15 14 | postgresql-$v-pg-explain-ui | - |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 |
el8.aarch64 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 |
el9.x86_64 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 |
el9.aarch64 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 |
el10.x86_64 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 |
el10.aarch64 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 |
d12.x86_64 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 |
d12.aarch64 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 |
d13.x86_64 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 |
d13.aarch64 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 |
u22.x86_64 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 |
u22.aarch64 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 |
u24.x86_64 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 |
u24.aarch64 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 | PIGSTY 0.0.2 |
Source
pig build pkg pg_explain_ui; # build rpm/debInstall
Make sure PGDG and PIGSTY repo available:
pig repo add pgsql -u # add both repo and update cacheInstall this extension with pig:
pig install pg_explain_ui; # install via package name, for the active PG version
pig install explain_ui; # install by extension name, for the current active PG version
pig install explain_ui -v 18; # install for PG 18
pig install explain_ui -v 17; # install for PG 17
pig install explain_ui -v 16; # install for PG 16
pig install explain_ui -v 15; # install for PG 15
pig install explain_ui -v 14; # install for PG 14Create this extension with:
CREATE EXTENSION explain_ui;Usage
explain_ui provides a function that takes a SQL query, runs EXPLAIN on it, and uploads the plan to Dalibo’s explain visualizer, returning a shareable URL.
Function
SELECT explain_ui($$
SELECT b.title, a.name, p.name
FROM books b
INNER JOIN authors a ON b.author_id = a.author_id
INNER JOIN publishers p ON b.publisher_id = p.publisher_id
ORDER BY b.publication_date DESC
$$);
explain_ui
--------------------------------------------------
https://explain.dalibo.com/plan/ccg2e5fedd913bb7The function:
- Runs
EXPLAIN (FORMAT JSON)on the provided SQL query - Uploads the plan to explain.dalibo.com
- Returns a URL to the visual plan representation
The visualizer is built on pev2 (PostgreSQL Explain Visualizer 2), providing an interactive graphical view of query execution plans.
Last updated on