{"id":15187229,"url":"https://github.com/agneum/plan-exporter","last_synced_at":"2025-10-07T05:39:54.241Z","repository":{"id":56702309,"uuid":"246095316","full_name":"agneum/plan-exporter","owner":"agneum","description":"Query plan exporter for psql","archived":false,"fork":false,"pushed_at":"2023-04-08T23:01:27.000Z","size":36,"stargazers_count":55,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T01:33:57.973Z","etag":null,"topics":["explain","postgresql","psql","query-plan"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agneum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-09T17:08:41.000Z","updated_at":"2025-01-21T23:07:50.000Z","dependencies_parsed_at":"2024-06-19T01:34:53.269Z","dependency_job_id":"9f4f9139-e8c8-4931-8811-23f87c73baa9","html_url":"https://github.com/agneum/plan-exporter","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agneum%2Fplan-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agneum%2Fplan-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agneum%2Fplan-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agneum%2Fplan-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agneum","download_url":"https://codeload.github.com/agneum/plan-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238423033,"owners_count":19469695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["explain","postgresql","psql","query-plan"],"created_at":"2024-09-27T18:04:54.496Z","updated_at":"2025-10-07T05:39:49.175Z","avatar_url":"https://github.com/agneum.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Query plan exporter\n\n[![Build Status](https://github.com/agneum/plan-exporter/workflows/build/badge.svg)](https://github.com/agneum/plan-exporter/actions)\n[![License](https://img.shields.io/github/license/agneum/plan-exporter)](/LICENSE)\n[![Go Report](https://goreportcard.com/badge/github.com/agneum/plan-exporter)](https://goreportcard.com/badge/github.com/agneum/plan-exporter)\n\nThe utility receives Postgres Query Plans from `psql` and sends them to a visualizer for sharing. \nIt will compute and highlight the most important information to make them easier to understand.\n\n## Installation\n\n#### Precompiled binary (Linux)\nIt's highly recommended installing a specific version of the `plan-exporter` available on the [releases page](https://github.com/agneum/plan-exporter/releases).\n\nTo quickly install the tool on Linux, download and decompress the binary, use an example:\n\n```bash\nwget https://github.com/agneum/plan-exporter/releases/download/v0.0.5/plan-exporter-0.0.5-linux-amd64.tar.gz\ntar -zxvf plan-exporter-0.0.5-linux-amd64.tar.gz\nsudo mv plan-exporter-*/plan-exporter /usr/local/bin/\nrm -rf ./plan-exporter-*\n```\n\n#### Build from sources\nVersion `1.13+` is required.\n\n``` \ngit clone git@github.com:agneum/plan-exporter.git\ncd plan-exporter\ngo install github.com/agneum/plan-exporter\n```\nOn default, make install puts the compiled binary in `go/bin`.\n\n## Usage\n\n1. Run `psql`\n\n1. Set up output to the query plan exporter:\n    ```bash\n    postgres=# \\o | plan-exporter\n    ```\n    * You may wish to specify `--target [dalibo|depesz|tensor]` to customize your visualizer\n    * You may also specify `--post-url \u003cURL\u003e` if you are deploying one of these targets on-premise\n\n1. Run explain query:\n    ```bash\n    postgres=# explain select 1;\n    postgres=# \n                          QUERY PLAN                      \n    ------------------------------------------------------\n     Seq Scan on hypo  (cost=0.00..180.00 rows=1 width=0)\n       Filter: (id = 1)\n    (2 rows)\n    \n    Do you want to post this plan to the visualizer?\n    Send '\\qecho Y' to confirm\n    ```\n\n1. Confirm of posting the plan to the visualizer: `\\qecho Y`\n\n    ```bash\n    postgres=# \\qecho Y\n    postgres=# Posting to the visualizer...\n    ```\n\n    That's it! Receive the link!\n\n    ```bash\n    The plan has been posted successfully.\n    URL: https://explain.depesz.com/s/XXX\n    postgres=#\n    ```\n  \n## Command-Line Options\n\n- `--target` - (string, optional) - defines a visualizer to export query plans. \n  Available targets:\n  - `depesz` - https://explain.depesz.com [default]\n  - `dalibo` - https://explain.dalibo.com\n  - `tensor` - https://explain.tensor.ru\n- `--post-url`- (string, optional, default: \"\") - the absolute URL to which the `\u003cform\u003e` will `POST` to.  A good reference would be to look for the `action` param in the `\u003cform\u003e` tag.\n- `--auto-confirm` (bool, optional, default: false) - send an execution plan automatically without additional confirmation. \n  The option allows using `plan-exporter` outside `psql`. For example,\n  ```bash\n  psql -f my_explain_file.sql | plan-exporter --target=dalibo --auto-confirm\n  ``` \n\n## Contact Information\n\nFollow the news and releases on [twitter](https://twitter.com/arkartasov).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagneum%2Fplan-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagneum%2Fplan-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagneum%2Fplan-exporter/lists"}