Problem
After every query, GenericSqlWorkspace.execute awaits delegate.resolveTableSchema(userSql, cols) before the rows are shown. For PostgreSQL this calls conn.getTableSchema(...), at least one catalog query, on every SELECT … FROM t, also when the same table was queried a second ago. Over an SSH tunnel or to a remote server this adds a full round trip (or more) to every result.
Scope
- Show rows as soon as
executeQuery returns; resolve PKs / types in the background and enable Save / edit hints when they arrive (the tab may already show another result: drop stale answers by generation).
- Cache
TableSchema per (connection, database, schema, table) for the session; invalidate on DDL run in the same workspace (DestructiveSqlDetector / classifier already knows DDL) and on Refresh in the tree.
- Same for MySQL and SQLite delegates.
Acceptance
Problem
After every query,
GenericSqlWorkspace.executeawaitsdelegate.resolveTableSchema(userSql, cols)before the rows are shown. For PostgreSQL this callsconn.getTableSchema(...), at least one catalog query, on everySELECT … FROM t, also when the same table was queried a second ago. Over an SSH tunnel or to a remote server this adds a full round trip (or more) to every result.Scope
executeQueryreturns; resolve PKs / types in the background and enable Save / edit hints when they arrive (the tab may already show another result: drop stale answers by generation).TableSchemaper (connection, database, schema, table) for the session; invalidate on DDL run in the same workspace (DestructiveSqlDetector/ classifier already knows DDL) and on Refresh in the tree.Acceptance
resolveTableSchemanever completes).ALTER TABLEit does.