Skip to content

Releases: ortic/pythia

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 30 Oct 08:05

Highlights

  • A quieter debugger. The SQL plan no longer opens by itself in the middle of stepping. On a misestimate the toolbar's plan icon blinks and shows ⚠ with the number of flagged statements, and a program window the debugger opens comes without the outline (#169, #170).
  • Conditional compilation without false errors. The editor reads each $IF's first branch as the code, and Format keeps statements with $IF as written (#171, #172).
  • A filter for the outline of a program window, for large packages (#173).
  • Modifier keys behave. Shift, Ctrl or Alt on its own no longer scrolls the editor to the caret, and Settings → Keyboard waits past the modifiers for the key (#175, #176).

Added

  • A filter for the outline of a program window (#173), for large packages. Typing part of a name lists the declarations that contain it, with the package or subprogram around them, and says how many match. Enter goes to the first one in the code, Escape clears the filter.

Changed

  • The debugger's SQL plan no longer opens by itself (#169). On a misestimate it came up beside the code in the middle of stepping and halved the code's width.
  • The toolbar's SQL is now a plan icon. It blinks for a few seconds when a statement's estimates are off by 10× or more, and then shows ⚠ with the number of such statements; opened, the plan shows the flagged statement. The gutter still marks its line. The setting Open the SQL panel on a misestimate is gone.

Fixed

  • Conditional compilation ($IF … $THEN … $ELSE … $END) showed errors that aren't (#171): $ELSE as "ELSE outside of IF or CASE", $END before an IF as "END IF without matching IF", and the real END IF after it the same. The editor reads each $IF's first branch as the code, as if its condition held, and reports only directives that don't pair up ($IF without $END, $END without $IF). Folding no longer closes an IF at $END, and the directives, $$PLSQL_UNIT too, show as keywords instead of a red $.
  • Format broke conditional compilation (#172): $IF x $THEN became $ if x $ then, which Oracle doesn't compile. Statements with $IF are kept as written (their branches are often half a construct); $$PLSQL_UNIT and the other inquiry directives format like names.
  • Debugger:
    • a program window it opens, at a stop or from a line of the SQL plan, comes without the outline (#170): it took the code's width while stepping. Outline shows it; a window that was already open keeps it as it was;
    • the SQL plan's note without row source statistics said to turn on Plan statistics in the debugger toolbar; it is in Settings → Debugger since #162, and the note says so (#174).
  • Pressing Shift, Ctrl or Alt in an editor scrolled back to the caret (#175), so a Shift+click (select to there), Ctrl+click (go to definition) or Alt+drag on lines scrolled away from the caret landed somewhere else. egui sends these keys as presses of their own since 0.36; the editor no longer reacts to them.
  • Settings → Keyboard recorded a shortcut's first modifier as the shortcut (#176): pressing Ctrl+Shift+K saved "Ctrl+ControlLeft". It waits for the key after the modifiers now.
  • View → Variables (SQL window) did nothing in a SQL window without bind (:name) or substitution (&name) variables, and switched the panel off unseen: it then didn't open for variables typed later (#168). The item is disabled there, with a hover text saying why, and ticked while the panel shows; from the command palette it says the window has no variables.

Full Changelog: v0.9.0...v0.10.0

v0.9.0

Choose a tag to compare

@github-actions github-actions released this 29 Oct 15:38

Highlights

  • Arrange the debugger your way. Its panels (Debugger, Variables, Watches, Breakpoints, SQL plan) are tabs you can drag into splits or floating windows, and the arrangement is kept (#163).
  • Misestimates come to you. Every stop checks the plans of the statements that just ran and marks a bad estimate in the gutter on its line. The SQL panel opens only when it's needed (#162).
  • Hover what you selected. Hovering a selected art_(1) or l_order.lines(i) shows that element, with subscripts that name variables. OPAQUE values say why they can't be shown (#165, #166).
  • Completion in large schemas finds every name, matching by prefix, word starts or substring (#160, #161).
  • INSERT exports go into the table the query reads, and a & in a value no longer becomes a substitution variable (#158, #159).

Changed

Debugger

  • The panels are tabs of their own (#163): Debugger (the stepping buttons, the state and the call stack), Variables, Watches, Breakpoints and SQL plan. Drag them into tabs, splits or floating windows, or close the ones you don't need. The arrangement is kept across restarts, and Show Debugger brings back a closed panel.
  • By default they sit side by side below the code, breakpoints behind watches, and the SQL plan opens right of the code. Its tab follows the toolbar's SQL (closing it hides the plan, the checks go on) and comes to the front on a misestimate. The toolbar wraps in a narrow tab; the shortcuts are in the buttons' hover text.
  • The SQL panel stays closed until it's needed (#162). Every stop checks the plans of the statements that ran in the step. One whose estimates are off by 10× or more (with at least 200 rows on one side) gets a warning in the gutter on its line, with the note as hover text, and the toolbar's SQL shows ⚠ and their number.
  • The panel opens on such a statement by itself the first time it is flagged (Open the SQL panel on a misestimate, Settings → Debugger). Plan statistics moved from the debugger's toolbar to Settings → Debugger.
  • Hovering a selection shows what it reads (#165): selecting art_(1) and hovering it showed art_, the whole collection. When the mouse rests in a selection that reads as a path (art_(1), l_rec.items(2).name), the hover shows that element or field.
  • Subscripts can name variables of the frame in hovers and watches: l_order.lines(i) is lines(3) while i is 3, and a text variable is a key of an INDEX BY VARCHAR2 table. Hovering amount in l_order.lines(i).amount shows the whole path, no longer i.amount.
  • OPAQUE values say why they have no contents (#166) when their type is declared in the package spec of the debugged body (debugging compiles only the body with debug information) or is a SQL type: the unit owner's, another owner's (sys.odcivarchar2list) or one reached by a synonym. Oracle's debugger can't read into an OPAQUE value at all; a watch or hover on one of its elements or fields says "art_ is OPAQUE: its contents aren't available" instead of "art_ has no (1)".

Results

  • INSERT statements go into the table the query reads (#158): Copy as → SQL INSERT, Export and Execute to file (.sql) wrote insert into my_table whatever the query. For select * from hr.orders where … they write insert into hr.orders, the name as the query has it. Results of joins and other queries over several tables keep the placeholder my_table.

Fixed

  • A & in an exported value turned into a substitution variable when the INSERT statements ran (#159): 'Missing (H&L)' asked for L in a SQL window (and in SQL*Plus) and inserted other text. The & is written outside the quotes now: 'Missing (H' || chr(38) || 'L)' on Oracle, N'…' + NCHAR(38) + N'…' on SQL Server, E'…\x26…' on PostgreSQL and a hex literal on MySQL.
  • Completion:
    • it offered wrong names in large schemas (#160). The popup asked once, after two letters, for the best 300 names, then only filtered those while typing on: names past the first 300 (mxn_it… after hundreds of mxn_a…) never showed, and names that merely contained the typed letters somewhere (mxn_access_mgmt_hist for mxn_it) filled the list. A list cut short is asked for again while typing on, and names match by prefix, word starts (mxn_it → mxn_inventory_transaction_tab) or substring, no longer by letters scattered through them;
    • it could lack objects of a large schema (#161): the schema's objects and the public synonyms were read in one query cut at 50,000 rows, in no order. The schema's objects are read in full now, the public synonyms after them. A materialized view is offered once, no longer also as its table of the same name.
  • New SQL (toolbar, File → New SQL Window, Ctrl+N) opened the window without the keyboard focus in its editor: typing went nowhere until a click into it (#157).
  • Debugger: hovering a field (name in l_rec.name) showed its value for one frame only, then the popup was gone (#164).

Full Changelog: v0.8.0...v0.9.0

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 29 Oct 07:02

Highlights

  • The real plan at the breakpoint. When the debugger stops, a new SQL panel lists the statements your code ran, each linked to its line, with the plan's estimated and actual rows side by side and misestimates flagged. Ask AI analyzes it with the code around it and the variables at the stop (#152).
  • Plans with actual rows everywhere. Run with statistics and the monitor's session and SQL details show the plan as a tree with Starts, E-Rows, A-Rows, A-Time and Buffers, and name the worst misestimate (#152).
  • Maintenance window and maintenance scan for Oracle, PostgreSQL, MySQL/MariaDB and SQL Server. They show what a table needs (stale statistics, unusable indexes, dead rows, fragmentation) and the statements that fix it (#144, #145).
  • Users and roles on MySQL/MariaDB, PostgreSQL and SQL Server. You can create and edit them in a form that shows the statements before it runs them (#142).
  • The single record view edits, and result grids keep the keyboard after a click (#141, #143).

Added

Debugger: the SQL the stopped code ran, with the real plan (#152)

  • The SQL panel beside the variables lists the statements the debugged session ran from PL/SQL since the start. Each has the unit and line it came from (V$SQL.PROGRAM_ID / PROGRAM_LINE#), anonymous blocks and dynamic SQL included, and the line link opens it.
  • At every stop it selects the statement at the stopped line, or the closest one before it. It shows that statement's plan with the last execution's Starts, E-Rows, A-Rows, A-Time and Buffers next to the estimates.
  • Misestimates: A-Rows is compared with E-Rows × Starts, which is right under nested loops. Lines off by 10× or more are marked, and the deepest one is named above the plan, e.g. "estimated 25,000 rows, got 200 (125× fewer)".
  • It says what the figures are: when a statement is still running (stopped inside its loop), it shows the last finished execution's figures, or says they come when the cursor is closed. It also says when other sessions run the statement with another plan.
  • Ask AI sends the plan with the statistics, the code around the line and the variables at the stop (as bind values, under the data policy). Copy plan copies DBMS_XPLAN's report.
  • Plan statistics in the debugger toolbar, on by default, runs the debugged session with STATISTICS_LEVEL = ALL. That gives its statements child cursors of their own.
  • Needs SELECT_CATALOG_ROLE, or SELECT on V$OPEN_CURSOR, V$SQL and V$SQL_PLAN_STATISTICS_ALL.

Maintenance (#144, #145)

  • Maintenance… on a table, materialized view or index opens a window with its state first, as evidence for what it needs. Then come the database's tasks, each with its options and what it locks or commits:
    • Oracle: gather, delete, lock or unlock statistics; rebuild unusable indexes and (sub)partitions, or an index; shrink space; move (online from 12.2).
    • PostgreSQL: VACUUM (analyze, freeze, full, verbose), ANALYZE, REINDEX (concurrently from 12).
    • MySQL: ANALYZE, OPTIMIZE and CHECK TABLE, with their answers.
    • SQL Server: UPDATE STATISTICS (sampled or full scan); rebuild (online on Enterprise) or reorganize the indexes.
  • A maintenance scan of a schema (Oracle, MySQL) or database (PostgreSQL, SQL Server) lists what its tables need. Each finding comes with its evidence and the statements that fix it, and the picked ones run as a batch (Tools → Maintenance Scan, or Maintenance scan… on the Tables folder).
  • The statements show before they run, one by one, on the window's own session with Break. While a statement runs, the window shows the progress the database reports. On a production connection it asks first; on a read-only one it doesn't run.
  • The dashboards' findings offer their fix: PostgreSQL's table with many dead rows opens its maintenance on VACUUM (ANALYZE), and transaction ID wraparound opens the scan. MySQL's dashboard names the table with the most reclaimable space, with OPTIMIZE TABLE.

MySQL/MariaDB, PostgreSQL and SQL Server

  • Users and roles can be created and edited (#142), like Oracle's. New user… / New role… on the Users and Roles sections (and in File → New Object), and Edit user… on one, open a form that shows the statements before Apply:
    • MySQL/MariaDB: user and host, password, expired, locked; granted roles and privileges on the server, a database or a table.
    • PostgreSQL: password, valid until, connection limit and role options; memberships; privileges on databases, schemas, tables and sequences.
    • SQL Server: users for a login, without login or with a password (contained databases); default schema; role memberships; permissions granted, grantable or denied.

Changed

  • Plans with actual rows: Run with statistics and the monitor's session and SQL details show the actual plan as a tree with Starts, E-Rows, A-Rows, A-Time, Buffers and Reads, the worst misestimate named above it, and DBMS_XPLAN's report a click away (#152).
  • Session details: the plan has the last execution's statistics (ALLSTATS LAST) when the cursor collected them.
  • AI assistant: the plan it gets for a cursor includes the last execution's statistics too.

Fixed

  • Result grids lost the keys one frame after a click: the arrows, Enter/F2, typing, Delete and Ctrl+C/V did nothing unless pressed right away (#143).
  • The single record view couldn't edit (#141). Its fields now edit like the grid's cells, and pending edits, inserted rows and the row filter are respected.
  • SQL Server: UPDATE STATISTICS in a SQL window without auto-commit left a transaction open (#150).
  • MySQL/MariaDB, PostgreSQL and SQL Server: New user… opened a form that only said the tool isn't available (#142).
  • MariaDB:
    • session details failed on the plan (before 10.9), or held up the monitor for 30 s for a session waiting for a row lock (#146);
    • session details showed no row locks or blocker (#147);
    • the dashboard showed no replica connections (#148), and its lock waits named tables with backticks (#149).

Full Changelog: v0.7.0...v0.8.0

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 28 Oct 07:08

Highlights

  • Debugger setup. When the database can't connect back to Pythia to debug, the setup finds out why (privileges, network ACL, host name, firewall) and fixes it, as you or through a DBA (#122).
  • Change values while debugging, Run to Cursor, and breakpoints and watches that survive a restart (#117).
  • Errors lead to their code. Each line of a PL/SQL error stack in Messages opens the code it was raised in, at that line (#112).
  • Sessions and Blocking Sessions on MySQL/MariaDB, PostgreSQL and SQL Server, and their users and roles in the object browser (#131, #130).
  • Bind and substitution variables in a panel next to the SQL editor instead of a dialog before each run (#110).
  • Pythia starts with the connect dialog, on the connection you used last: press Enter to connect again (#132, #134).

Added

Debugger

  • Debugger setup (Debug → Debugger Setup…, Setup… in the Debugger panel and Settings → Debugger, and on its own when a debug run can't connect) (#122):
    • tries each host the database might reach this computer by (the address the database sees, its full and short name, one you type) and says why one fails: no ACL entry, a name the server can't resolve, refused, or dropped on the way;
    • offers what's missing: Use a host that works; the grants and the ACL entry (this host, its subnet or domain, or any), run as yourself, through a saved DBA connection or a user and password, or copied for a DBA, with the script to undo it;
    • adds a firewall rule after asking: Windows Firewall (also removing rules that block Pythia, left by answering Cancel to Windows' prompt), ufw, firewalld or the macOS firewall;
    • new setting Debugger ports (Settings → Debugger) for firewall rules and ACL entries limited to a few ports.
  • Change values while stopped (#117): double-click a value in Variables or Watches, or right-click → Set value… or Set to NULL, for local variables, IN OUT and OUT parameters, record fields, collection elements and package globals. Numbers are checked against their precision and range first, and a value the database refuses says why.
  • Run to Cursor (Ctrl+F7) continues to the cursor line and stops there once, also in a unit that isn't loaded yet (#117).
  • Kept across restarts: breakpoints with whether they're enabled, their conditions and hit counts, the watches and Break on exceptions (#117).

Program windows

  • The outline has a context menu (#124): Test… and Debug… a procedure or function (overloads included, from the spec's or the body's outline), Go to body / Go to specification, Find references and Copy name. Entries that can't work (private and local subprograms, units not compiled yet) are disabled and say why.

Errors

  • Every line of a PL/SQL error stack in Messages (ORA-06512: at "OWNER.NAME", line N) is a link to the package body, procedure, function, type body or trigger at that line; hovering shows the line's code (#112).
  • Open where raised, next to Fix with AI, opens the innermost one whose source you can see. Lines in code you can't see say why on hover.

MySQL/MariaDB, PostgreSQL and SQL Server

  • Monitor → Sessions and Blocking Sessions, as on Oracle (#131):
    • every session, idle ones too, with user, host, database, program, status, wait, time, open transaction, blocker and statement; filter, sort and Active only;
    • the blocking tree shows who waits for whose locks, idle blockers with an open transaction marked;
    • double-click opens the session's details; the menu cancels its statement or ends the session after asking, and opens the statement in a SQL window;
    • the dashboard's "connections by …" bars open the sessions they count.
  • Users and roles in the object browser (#130): MySQL's users as user@host, PostgreSQL's login roles as users, SQL Server's database users and roles. Copy name and Drop…; editing and creating them stays on Oracle.
  • MySQL/MariaDB: the object browser reopens the database you picked last for each connection, unless the profile sets one (#133).

Changed

  • The connect dialog opens when Pythia starts (#132), on the connection used last with its saved password, so connecting again is one Enter (#134). On a first start it opens empty for a new connection; Cancel leaves Pythia without a connection as before.
  • SQL windows show their bind and substitution variables in a Variables panel next to the editor instead of asking in a dialog before each run (#110). The values stay visible and can be changed at any time; only a statement with a variable that has no value yet waits for one. Debug works the same way. &var keeps its value for the window like &&var.

Fixed

  • Read-only connections ran statements that aren't queries in some cases: the rest of a script after its first statement, a statement after its variables were entered, and Profile and Debug. Every statement is checked now, and Profile and Debug are refused (#115).
  • Favorites and recent objects:
    • disconnecting the connection the object browser showed, or connecting its profile again, cleared them for every connection, for good (#136);
    • they were lost, with the open project, when Pythia was closed with no document open (#118).
  • Test… and Debug…:
    • the generated block didn't compile for collections, records, %ROWTYPE, objects, BLOBs, XMLTYPE and ref cursors; it now prints them (collections element by element, records field by field, cursors row by row) (#120);
    • a unit with a quoted mixed-case name ("MyPkg") was called lowercased (#121).
  • Debugger:
    • when the debugged session couldn't connect, the panel kept saying Waiting for the session…; the run now ends and says why (#123);
    • Watch on an element of a collection with text keys (l_map('Key')) didn't find it (#119).
  • Editor:
    • trigger compile errors were marked too high, by the lines of the trigger's header (#114);
    • Switch Spec/Body jumped to the wrong overload when the body orders them differently than the spec (#125);
    • the status bar's invalid objects count didn't follow compiles in program windows, object and table editors, or PL/SQL blocks in SQL windows (#127).
  • MariaDB: explain plan failed with Unknown EXPLAIN format name: 'tree' (#128), and the Uses / Used by tabs with Unknown table 'view_table_usage' (#129).
  • Look and settings:
    • light theme: selected text was almost invisible (#111);
    • the fields of the variables prompt were only a few characters wide (#109);
    • a long hint in Settings → Queries made the settings window wider than the screen (#113);
    • Settings → Formatter: the New profile row didn't line up at a bigger interface font (#116).

Downloads

Every package comes in two flavors:

  • pythia_… / pythia-v0.7.0-<platform>…: the pure-Rust Oracle driver, so no Oracle client is needed. Take this one unless you need the other.
  • pythia-instantclient_… / …-instantclient: uses the Oracle Instant Client, which you install yourself. You need it for Oracle 11.

Installing one flavor replaces the other; settings and connections stay.

Platform Packages
Linux x86_64 .deb, .AppImage, .tar.gz
Windows x86_64 .msi, -setup.exe, .zip
macOS (Apple Silicon aarch64, Intel x64) .dmg, .tar.gz

SHA256SUMS.txt has the checksums of all files.

Full changelog: CHANGELOG.md · compare v0.6.0...v0.7.0

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 27 Oct 07:02

Highlights

  • PostgreSQL and SQL Server (experimental). Connect with Type: PostgreSQL or Type: SQL Server and get the tools MySQL has: SQL windows, explain plan, completion, the object browser and object views (#36). Each database has a monitoring dashboard (#92) with session details, cancel and kill (#96), and both connect through SSH (#97).
  • Appearance settings. Choose the interface font and its size, or a Compact layout with less padding and smaller margins. You can also set an accent color, corners, shadows and scroll bars, plus the result grid's font and the editor's line spacing and cursor (#105).
  • MySQL results editable in place. Rows are found by the table's primary or unique key (#101).
  • INSERT statements in each database's own SQL from Export and Copy as (#106).
  • Oracle over TLS (TCPS) no longer crashes when connecting (#104).

Added

PostgreSQL and SQL Server (experimental)

  • Connections with Type: PostgreSQL and Type: SQL Server (#36). Scripts split the database's way: dollar-quoted routine bodies and :: casts on PostgreSQL, GO batches and BEGIN … END blocks on SQL Server.
  • A monitoring dashboard each (Monitor → Dashboard), like MySQL's (#92):
    • findings first, KPI tiles and trend charts from the server's counters;
    • what runs and waits now, and connections by user, application or program, client and database;
    • lock waits and blocking with the blocker's statement (or that it sits idle in a transaction), open transactions, storage, and top statements with Analyze;
    • PostgreSQL: from pg_stat_activity, pg_stat_database, pg_locks, the replication views and pg_stat_statements, with findings for idle transactions, replication lag and inactive slots, transaction ID wraparound and dead rows;
    • SQL Server: from the DMVs and performance counters, with top waits since the last refresh, log use and page life expectancy;
    • without pg_read_all_stats or VIEW SERVER STATE, the dashboard shows what it can and says what's missing.
  • Session details from the dashboard's session ids (#96):
    • how the session connected, and the statement it runs or ran last; on SQL Server with its cached plan as an outline and the showplan XML to copy;
    • its transaction, its locks with the tables named, and the sessions it waits for and blocks;
    • Cancel query and Terminate (PostgreSQL) and Kill (SQL Server) ask first and say what gets rolled back.
  • Connect through SSH, as on MySQL. The address is the database as the SSH server sees it (localhost:5432/database). On PostgreSQL, TLS still checks the database's own host name, and on SQL Server the login stays encrypted. A named SQL Server instance (host\instance) can't be found through a tunnel, so give its port instead (#97).
  • SQL Server messages: PRINT output and informational messages (RAISERROR up to severity 10, "Changed database context to …") show as messages, in order with the batch's results (#98).

Appearance (#105)

Settings → Appearance:

  • Interface font: a TrueType/OpenType file and a size for menus, tabs, dialogs and the object browser, separate from the zoom, which still scales everything.
  • Density: Comfortable (the look so far) or Compact, or padding, gaps, margins and tree indent set one by one. Rows of the object browser, lists and tables, the toolbar, the status bar and the tabs follow.
  • Look: an accent color, square corners, shadows off, scroll bars that are always visible, animations off, and object names in the browser in the interface font.
  • Result grid: the code font or the interface font, its own size, striped rows on or off, lines between rows, and what NULL looks like.
  • Editor: line spacing, and a line, block or underline cursor that blinks or not.

With the default settings, Pythia looks exactly as before.

MySQL

  • Results can be edited in place, as on Oracle (#101):
    • MySQL has no ROWID, so the table's primary key (or a unique key on NOT NULL columns) finds a row again. Edit adds its columns, read-only, to the end of the result, also when the query doesn't select them.
    • Applying checks the values that were fetched, so a row another session changed is a conflict. FLOAT values, which MySQL shows rounded, and JSON compare as such.
    • Text with a backslash is written as hex, so it works with or without NO_BACKSLASH_ESCAPES.
    • Tables without such a key stay read-only and say why.

SQL windows

  • Edit isn't offered for DISTINCT, GROUP BY or aggregate queries, whose rows aren't the table's.
  • Backtick-quoted names are identifiers to the editor and the statement splitter, so a ; inside one doesn't end the statement.

Changed

  • Building: a fast profile (cargo run --profile fast -p pythia-app) for running an optimized build locally. A change rebuilds in 5–15 s, where the release profile takes about two minutes for link-time optimization. Clean builds no longer compile aws-lc (about 90 s), because TLS runs on ring in all drivers (#99).

Fixed

  • Oracle over TLS (TCPS) no longer crashes on connecting. With two crypto providers compiled in, rustls couldn't pick one (#104).
  • Read-only connections no longer let results be edited and applied. Before, only statements run from the editor were held back (#107).
  • Export → SQL INSERT and Copy as → INSERT wrote Oracle SQL on every connection (#106):
    • on MySQL, column names went into double quotes (a syntax error) and dates into to_date(…), and VARBINARY values were stored as text;
    • on SQL Server, datetime values swapped month and day under DATEFORMAT dmy;
    • the statements now use each database's quoting and literals: backtick names and X'…' on MySQL, E'…' for backslashes on PostgreSQL, and N'…', 0x… and ISO 8601 dates on SQL Server.
  • MySQL: the database picked in the object browser now becomes the connection's database, as 0.5.0 meant to do (#81). SQL windows no longer fail with No database selected (#102).
  • The schema after login: a connection reports the schema its login statements leave it in (#103):
    • a MySQL profile with a Default schema no longer shows "No database";
    • on Oracle and PostgreSQL, the object browser and completion start in the profile's default schema, or the one the login script sets.
  • Connect dialog: Connect no longer stays disabled after Connect through SSH was ticked for MySQL and the type changed to one without tunnels (#95).
  • Editing another user no longer needs SELECT_CATALOG_ROLE. The form opens with what the session can read, and leaves anything it couldn't read as it is (#89).
  • Monitor:
    • a view that isn't granted no longer takes down what doesn't depend on it: without V$SQL the session list shows sessions without their SQL text, and without V$OSSTAT the dashboard keeps its instance header (#90);
    • AWR plan history lists snapshots in time order in a PDB, and says so when no plan was kept (#93);
    • the session list's filter chip shows an × instead of a box (#91).

Downloads

Every package comes in two flavors:

  • pythia_… / pythia-v0.6.0-<platform>…: the pure-Rust Oracle driver, so no Oracle client is needed. Take this one unless you need the other.
  • pythia-instantclient_… / …-instantclient: uses the Oracle Instant Client, which you install yourself. You need it for Oracle 11.2, servers that require Native Network Encryption, and OS or wallet logins.

Installing one flavor replaces the other; settings and connections stay.

Platform Packages
Linux x86_64 .deb, .AppImage, .tar.gz
Windows x86_64 .msi, -setup.exe, .zip
macOS (Apple Silicon aarch64, Intel x64) .dmg, .tar.gz

SHA256SUMS.txt has the checksums of all files.

Full changelog: CHANGELOG.md · compare v0.5.0...v0.6.0

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 26 Oct 14:56

Highlights

  • Monitor drill-downs (Oracle). The dashboard now leads to what it counts: sessions, statements, wait events, tablespaces and memory. Sessions and statements get new detail views. Where the management packs are enabled, they include Active Session History, AWR plan history and SQL Monitor reports (#74).
  • Debug… from the object browser and program windows. Start the debugger on a procedure, function or package member. It stops on entry with no breakpoint needed (#71).
  • One active connection for the whole app. The toolbar, object browser, status bar and SQL windows all work on the same connection, so a statement no longer runs on a different database than the one the browser shows (#80).
  • MySQL. Thread details open from the dashboard (#87), and the database picked in the object browser is the one SQL windows use (#81).
  • WSL. Pythia no longer brings down WSLg, which used to close every Linux GUI window (#88).

Added

Monitor (Oracle) (#74)

  • Dashboard links. Each of these opens its details:
    • the Sessions tile opens the session list, and Blocked sessions opens the blocking tree;
    • wait classes and the user, program and machine bars open the session list filtered to them, with the filter shown as a chip;
    • Most open cursors opens that session's cursors, and a long operation opens its session;
    • a blocking finding has Details on the blocker.
  • Session details open on a new Overview:
    • client and connection: OS user, machine, client process and driver, service, network encryption;
    • the open transaction, PGA, temp space and active sorts, long operations;
    • the PL/SQL being run, with a link to the subprogram;
    • where its time went (time model) and its waits since logon.
  • More in session details:
    • captured bind values, and the session's own plan with peeked binds;
    • statistics as the change since the last refresh, open cursors grouped by SQL_ID, and All columns of V$SESSION;
    • locked tables and the row a session waits for open in the IDE;
    • each tab loads when first shown.
  • Session ⏷ menu: cancel its SQL, kill it, Disconnect after transaction, and turn SQL trace on or off. Blocked by and the sessions it blocks are links. The kill dialog says how much of an open transaction gets rolled back.
  • SQL details, a tab per statement:
    • totals and per-execution figures;
    • child cursors with plan hash, bind awareness and SQL profile, baseline or patch;
    • each child's plan, with actual rows when they were measured;
    • captured binds, why the cursor isn't shared, and the sessions running it.
      It opens from Top SQL, the session list and session details.
  • Top wait events since the last refresh. Each event opens the sessions waiting on it and its latency histogram.
  • History of a session or a statement:
    • Diagnostics Pack: the last hour of Active Session History, an ASH report filtered to just it, and the plans AWR kept;
    • Tuning Pack: the executions SQL Monitor watched, with their reports as text or HTML;
    • a pack that isn't enabled says so, and its views aren't queried.
  • Tablespaces unfold into their files and largest segments, or the sessions using a temporary tablespace. The PGA bar unfolds the sessions using the most.

MySQL

  • Thread details, from the thread ids in the dashboard's running statements, open transactions and lock waits (#87):
    • how it connected: program, client library and version;
    • the statement it runs or ran last, with EXPLAIN FOR CONNECTION;
    • its transaction, and the data and metadata locks it holds or waits for;
    • its recent statements.
      Kill query and Kill connection ask first and say what a kill rolls back.

Editor

  • Debug… next to Test… on procedures, functions and package members. It opens the test block and debugs it right away, stopping on entry to the subprogram (any overload); the unit is compiled with debug information first. In a program window, right-clicking a subprogram in the spec, or a public one in the body, offers Test… and Debug… too (#71).
  • Compile all has a tooltip: it compiles the specification, then the body, and stops at the first error (#78).

Changed

  • Active connection:
    • Connecting, the object browser's connection picker and the toolbar's connection menu switch it.
    • SQL windows with an open transaction or a running statement ask before switching.
    • Other connections stay open to switch back to, and disconnecting the active one hands over to another.
    • Program windows and object views keep their connection and name it in their tab.
    • With Switch connection per window on, SQL windows keep their own connections as before (#80).
  • MySQL: the database picked in the object browser is the connection's database. Open SQL windows switch to it and new ones start in it, instead of failing with "No database selected". The toolbar and status bar show the current database (#81).
  • The SQL and program editors fill their tab instead of sitting in a 22 px gray frame (#86).

Fixed

  • WSL: WSLg's compositor crashes when a Wayland app grows a shared-memory buffer pool, as Pythia did for each new mouse cursor shape (microsoft/wslg#1386). Under WSLg Pythia now opens its window through X11 (Xwayland); PYTHIA_WAYLAND=1 keeps Wayland (#88).
  • Windows: pythia.exe carries Pythia's icon and version. The taskbar, Start menu, shortcuts and Explorer show Pythia's icon, and Task Manager lists it as Pythia (#77).
  • Test… on an overloaded package subprogram tests that overload, not always the first one (#85).
  • Clicking an entry in the completion list inserts it. Before, only the keyboard worked (#72).
  • Session details show an open cursor's whole statement, not the first 60 characters (#73).
  • Session details of an ended session no longer show data of the session that took over its SID. A blocker missing from the session list no longer offers actions with a guessed serial# (#75).
  • The monitor names objects, rows and TM-locked tables in every schema, not only those the monitoring user can see (#76).
  • Trace analyzer: statements re-run through a cached cursor are counted each time (#79).
  • MySQL errors read ERROR 1046 (3D000): … without an ORA- prefix (#82).
  • MySQL: the database picker no longer lists a PUBLIC database (#83).
  • After disconnecting one of several connections, Execute in a window that was on it runs on the active connection instead of opening the Connect dialog (#84).

Downloads

Every package comes in two flavors:

  • pythia_… / pythia-v0.5.0-<platform>…: the pure-Rust Oracle driver, so no Oracle client is needed. Take this one unless you need the other.
  • pythia-instantclient_… / …-instantclient: uses the Oracle Instant Client, which you install yourself. You need it for Oracle 11.2, servers that require Native Network Encryption, and OS or wallet logins.

Installing one flavor replaces the other; settings and connections stay.

Platform Packages
Linux x86_64 .deb, .AppImage, .tar.gz
Windows x86_64 .msi, -setup.exe, .zip
macOS (Apple Silicon aarch64, Intel x64) .dmg, .tar.gz

SHA256SUMS.txt has the checksums of all files.

Full changelog: CHANGELOG.md · compare v0.4.1...v0.5.0

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 26 Oct 11:23

What's Changed

  • Monitor test: an AWR report over two snapshots of its own (#58) by @Remo in #59
  • MySQL support: dialect layer, SSH tunnels, monitoring dashboard by @Remo in #57
  • Losing the window mid-session no longer restarts Pythia with OpenGL (#60) by @Remo in #61
  • Settings: a tall page scrolls, the close button stays on screen (#62) by @Remo in #63
  • The theme's background behind the dock, not eframe's black (#64) by @Remo in #65
  • Release an Instant Client flavor next to the pure-Rust one (#66) by @Remo in #70
  • Find tnsnames.ora where Oracle's clients do; say what was searched (#67) by @Remo in #69

Full Changelog: v0.3.0...v0.4.1

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 07:01

What's Changed

  • Oracle 11.2 to 21c: no FETCH FIRST or 12.1 dictionary columns, 18c fe… by @Remo in #20
  • Spike: probe the pure-Rust oracledb driver against what Pythia needs by @Remo in #27
  • Use the pure-Rust oracledb driver by default; Instant Client opt-in by @Remo in #49

Full Changelog: v0.2.0...v0.3.0

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 10:31

Changed

  • Toolbar: follows the focused window. Commit and Rollback are only enabled
    with a pending transaction (and then stand out), never open a session,
    and say when auto-commit is on; Execute becomes Compile in program windows
    and is disabled where nothing runs; disabled buttons say why. New: a
    labelled New SQL button with Open file/Reopen closed, Save, a connection
    selector (switch this window's connection, connect, disconnect), an
    auto-commit toggle and Format.
  • Object views: views and code objects open on their DDL (tables still on
    their columns), and the next object of a type opens on the tab you chose
    last. Only the shown tab loads, on a metadata session of its own, so
    views and edit forms no longer wait behind the object browser,
    completion or compiles. A view's columns skip the primary key lookup,
    and its edit form takes WITH READ ONLY / WITH CHECK OPTION from the
    view's text where the database keeps it there (23ai) instead of
    searching all constraints. RUST_LOG=pythia_db=debug logs how long each
    metadata query took.
  • Completion: the list shows up to 15 suggestions (Settings → Code
    assistance → Visible rows), as many as fit below the line, and opens
    above the line when there is more room there instead of covering it. It
    is as wide as its entries need, up to a limit; long names and details are
    cut with "…" instead of running into each other. A pane next to the list
    shows what hover shows for the selected entry: a column's type,
    nullability and comment, a subprogram's signatures and doc comment, a
    snippet's text.

Added

  • AI assistant (#1). Settings → AI configures several models at once, one
    of them the default, with a Test button: the Anthropic Messages API,
    OpenAI-compatible chat completions, local model servers (Ollama,
    llama.cpp, LM Studio; no key) and command line tools (prompt on stdin,
    answer on stdout). API keys are kept in the OS keychain. A side panel
    (View → AI Assistant) holds the conversation; questions take the focused
    window's connection and statement along. From editors (AI menu, context
    menu, palette): generate SQL from a description with the schema's real
    tables, columns and foreign keys; explain, fix (with the errors) or
    rewrite the statement under the cursor or the selection, then replace it
    or insert the answer's code; analyze the execution plan. "Analyze with
    AI" / "Fix with AI" buttons on plans, run statistics, errors, compile
    errors, top SQL, session details, AWR/ASH reports and traces. Requests
    carry table definitions, keys, indexes, statistics, plans and source;
    result rows and bind values only when allowed in Settings → AI, and each
    answer shows what was sent and what was held back. On the Claude API, a
    request Claude declines is answered by the fallback model Anthropic
    recommends for it.
  • Editors: a context menu. On a database object it offers what the object
    browser offers (query, edit, test, describe, edit table, grants, generate,
    compile, favorites, copy name) and Show in object browser; on a local
    name, go to declaration and find references; plus cut, copy, paste,
    select all, toggle comment and format. On a package member (pkg.proc)
    Edit and Ctrl+click open the package at that subprogram.
  • Invalid objects: the status bar shows how many there are (current schema
    or all user schemas, refreshed on connect, after compiles and DDL and on
    an interval). Clicking it opens a window listing them with their first
    error; it recompiles selected or all objects in dependency order over
    several sessions (Settings → Invalid objects), with progress, cancel and
    what is still invalid afterwards, and marks objects you may not compile.
    SYSDBA connections can use UTL_RECOMP. The browser's recompile button
    uses it too.
  • Navigation in packages: in a program window the body knows the spec's
    declarations and the other way round (go to definition, hover,
    completion, references), Ctrl+click on a call picks the overload its
    arguments fit, a named argument (p_id =>) leads to the callee's
    parameter, labels (exit outer_loop, goto done) are navigable, and
    hover shows the comment above a declaration. New commands (palette,
    Settings → Keyboard, editor menu): Back/Forward (Alt+Left/Right, mouse
    buttons), Switch Spec/Body (Ctrl+Shift+B), Go to Symbol (Ctrl+F12), Peek
    Definition (Alt+F12) and Find References (Shift+F12) as a list to step
    through.
  • Debugger: step through the debugged block itself (it now has debug
    information), and stepping out of the outermost unit continues there; the
    SQL window marks the block's line.
  • Debugger: the call stack names the subprogram (orders_api.load_order:31)
    and the package initialization section.
  • Formatter: profiles (named rule sets to switch between, export and import
    as TOML to share a team style), learning the rules from the focused
    editor or the current schema's stored source (the differences are shown
    with the preview before you apply them), and formatting automatically on
    save and compile, on paste and when a statement's ; is typed (only
    what changes is replaced, as one undo step, and the caret stays put).
    New rules: CASE arms, subqueries, parameter lists and INSERT column and
    VALUES lists each fit on one line or always break, and THEN/LOOP on their
    own line. AI: Format Unsupported Statements hands the statements the
    formatter keeps as written (unsupported constructs, failed safety checks)
    to the AI with the same rules; an answer is applied only if it changes
    nothing but whitespace and case, as one undo step.
  • Database links: the object view has a Details tab (connects as, host,
    created; another schema's private link from DBA_DB_LINKS where you may
    read it) and Test link, also in the context menu, which queries over the
    link and says whether it works.
  • Debugger: selecting a frame in the call stack shows its variables, and
    watches and hover values in its unit come from that frame (its package's
    globals included). Every stop selects the innermost frame again;
    breakpoint conditions are always evaluated where the breakpoint is.
  • Debugger: Settings → Debugger → Compile with debug information makes
    program windows compile with debug information, so Step into enters
    those units without a breakpoint in them. Off by default, as Oracle runs
    such code less optimized. Oracle's notes about the option (PLW-06015,
    PLW-06013) aren't listed with the compile messages. Units that already
    have debug information are no longer recompiled before a debug run.
  • Debugger: when Step into goes over a unit without debug information, the
    panel says so (for the first call in the session, when the unit is
    loaded; later calls can't be told apart from code without calls).

Fixed

  • Object browser: public database links and public synonyms are listed,
    under a PUBLIC entry in the schema list. Database links are also read
    from ALL_DB_LINKS, for versions whose ALL_OBJECTS leaves them out. Drop
    works for public synonyms and links and for links with dots in their
    name.
  • Windows: no console window with log output next to the app (also none for
    git and other helper programs). Started from a terminal, the logs still
    show there. Problems at startup are shown in a message box, and About has
    an "Open log folder" button.
  • Connect dialog: without the Oracle Instant Client it lists the steps for
    this platform, with the download page as a working link (copying the old
    one picked up a trailing comma and led to a 404) and the Visual C++
    redistributable on Windows.
  • Debugger: a step no longer stops again on the line it started from.
  • Debugger: a step that ended at a breakpoint no longer stops later, after
    continuing, where the step would have ended.
  • Debugger: breakpoints reached while stepping count their hits; stepping
    from a breakpoint doesn't count it twice.
  • Debugger: records in index-by tables show their fields, elements are named
    by their key (('L1')), and watches accept text keys.
  • Debugger: SQL collection types show as not readable instead of NULL.
  • Debugger: after pausing in code without debug information (e.g.
    DBMS_SESSION.SLEEP), the editor shows the nearest frame with source,
    and the variables and watches are that frame's.
  • Debugger: clicking a frame in the call stack didn't open its source.
  • Debugger: globals of a package the session hasn't instantiated yet (e.g.
    a spec loaded for its types, whose constants the compiler inlined where
    they are read) read as NULL. Oracle's agent has no values for them until
    the package is first used; the watch now says so. NULL globals of an
    instantiated package still read as NULL.
  • Completion: after a short list (e.g. filtered down to three matches),
    later lists no longer stay that small until the app restarts.

Full changelog: v0.1.0...v0.2.0

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 06:38

Added

Application

  • Native egui/wgpu application with an OpenGL fallback, dockable layout,
    command palette (Ctrl+Shift+P), PL/SQL Developer compatible keys, dark and
    light themes, settings window, workspace and editor contents restored on
    start, crash logging.
  • Multiple simultaneous connections; every window has its own session and
    transaction. Connection manager with folders, colors and production
    markers, read-only connections, passwords in the OS keychain,
    tnsnames.ora aliases.
  • Open and save SQL/PL/SQL files, drag and drop files, reopen closed windows.

Editor

  • Rope-backed code editor: virtualized rendering, multi-cursor, block
    selection, find/replace with regular expressions, bracket and keyword
    matching, auto-indent, comment toggling, case conversion, line moves.
  • Error-tolerant PL/SQL parser and language engine: completion of columns
    (aliases, joins, CTEs, inline views), package members, records, locals and
    dictionary objects; signature help, hover, go to definition, references,
    live syntax diagnostics and an outline.
  • Code formatter (Ctrl+Shift+F) with configurable rules and a live preview.
  • Code folding, numbered bookmarks and snippets with placeholders; folds
    and bookmarks are saved with the workspace.
  • Rename a local symbol in place (Shift+F6).
  • SQL*Plus commands get their own highlighting.
  • Files keep their encoding (UTF-8, UTF-8 BOM, Windows-1252) and line
    endings.
  • Configurable keyboard shortcuts (Settings → Keyboard) and a code font
    from a font file.

SQL windows

  • Execute the statement under the cursor, the selection or a script;
    SQL*Plus exec, prompt, define, desc; bind and substitution
    variable prompts; DBMS_OUTPUT; statement history.
  • Virtualized result grid with sorting, selection, aggregates, record view,
    value viewer and export to CSV, TSV, JSON, Excel, INSERT, Markdown and HTML.
  • In-place editing of results with optimistic concurrency checks.
  • Explain plan as a tree and "Run with statistics" with the actual plan and
    session statistics.
  • Bar and line charts for any result.
  • Foreign key navigation: open a row's parent or child rows.
  • Hide columns; paste Excel ranges into editable results; edit long text
    and dates (with a calendar) in a dialog.
  • Execute a query straight into a file (CSV, TSV, JSON, INSERT, Markdown)
    with progress and cancel.

PL/SQL development

  • Object browser, object views (columns, constraints, indexes, grants,
    dependencies, DDL), program windows with spec/body and compile errors,
    generated statements, test scripts, recompile invalid objects.
  • Object browser: favorites, recently opened objects, filters for invalid
    or recently changed objects, indexes/constraints/triggers/referencing
    tables under tables, drag names into editors.
  • Program windows: Update spec copies changed signatures from the body.
  • Form editors for sequences, views, synonyms, indexes and grants.
  • PL/SQL debugger over DBMS_DEBUG_JDWP: breakpoints, stepping, call stack and
    variables including records and collections.
  • Debugger: watches, values on hover, conditional and hit-count
    breakpoints, enabling/disabling breakpoints, break on exceptions.
  • Profiler (DBMS_HPROF) for blocks and calls.
  • Find in database source with regular expressions.
  • Find in source searches views and job actions and filters by kind and
    name; data search finds columns by name.

Tools

  • Monitoring: dashboard with findings and live charts, sessions with a
    blocking tree, session details, kill/cancel, AWR/ASH reports (when
    licensed) and a tkprof-style trace analyzer.
  • Schema compare with structural table diffs and ordered sync scripts; data
    compare by key.
  • Import from CSV and Excel with type inference into new or existing tables.
  • Import: per-column trim, date format and SQL expressions; skip and log
    bad rows.
  • Export tables tool with a WHERE per table, DDL, delimiter and NULL text.
  • Project panel: folders under git with status, diff with the last commit
    or with the database, schema export to one file per object, deployment
    of changed files.
  • Scheduler jobs window: run, stop, enable, disable, drop, run history.
  • Saved user reports with parameters.

Install

Pick the package for your platform below (.deb/.AppImage, .msi/-setup.exe, .dmg) or a plain archive; SHA256SUMS.txt has the checksums. Pythia needs the Oracle Instant Client, which is installed separately; see Installing in the README.