{"repo":"jnidzwetzki/pg_plan_alternatives","free":true,"listed":false,"github":"https://github.com/jnidzwetzki/pg_plan_alternatives","clone":"git clone https://github.com/jnidzwetzki/pg_plan_alternatives.git","description":"An eBPF based query planning tracer for PostgreSQL","language":"Python","stars":42,"topics":["database-internals","ebpf","observability","postgresql","query-planner"],"license":"MIT","category":"databases-storage","readme_excerpt":"pg plan alternatives: A PostgreSQL Plan Alternatives Tracer An eBPF-based tool designed to show all query plans that are considered by PostgreSQL during query planning, not just the final chosen plan as shown in EXPLAIN output. 🎯 Overview PostgreSQL uses a cost-based optimizer to determine the most efficient way to execute a query. When PostgreSQL plans a query, it considers many different execution paths and chooses the one with the lowest estimated cost. The standard EXPLAIN command only shows the final chosen plan. pg plan alternatives reveals all the alternative plans that were considered, along with their costs, giving you a complete picture of the optimizer's reasoning. Key features: - pg plan alternatives : eBPF-based tracer that captures all query plans considered during planning - visualize plan graph : Creates interactive graph visualizations from trace output - Supports PostgreSQL 17 and 18 - Resolves planner struct offsets automatically from DWARF debug info in the PostgreSQL binary - JSON output format for easy processing - Shows cost estimates (startup and total) for each alternative - Highlights which plan was ultimately chosen Note: This tool relies on eBPF ( Extended Berkeley Packet Filter ) technology and requires root privileges to run. The PostgreSQL binary must contain DWARF debug symbols so offsets can be extracted. [!IMPORTANT] Early prototype implementation not intended for production use (see limitations below) ⚡ Quickstart 1. Install the tool: 2. Id","default_branch":null,"files":null,"tree":[],"storefront":"/r/jnidzwetzki","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jnidzwetzki/pg_plan_alternatives/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}