Skip to content

perf(schema): open a table from the shared column catalog - #4357

Merged
datlechin merged 11 commits into
mainfrom
perf/column-catalog-third
Nov 19, 2026
Merged

datlechin merged 11 commits into
mainfrom
perf/column-catalog-third

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • P9 of the macOS performance plan: a table tab's first page is built on the column list the connection's completion catalog already holds, and the table's own column read runs beside the page instead of before it.
  • The catalog answers only after a complete bulk read (providesBulkColumnFetch), for a table listed once under that exact schema and name. Never for a temporary table, a tab restoring a saved sort or page, or while a catalog change is being applied.
  • The browse sync seeds the catalog with one bulk column read per table list, on the bulk metadata connection.
  • The page shows once the column read is back. The run that shows it compares the SQL the confirmed list builds, with the default sort chosen again, to the SQL that ran.
  • A difference puts a bar over that result: "The structure of "orders" changed. Reload to show its current columns.", with Reload and Dismiss. Nothing runs again by itself.
  • A page that fails on an outdated list shows the engine's error as today, plus the same bar. A list no read confirmed is dropped from the catalog.
  • Reload builds on the list the verdict confirmed, with no read of its own, asks about unsaved edits first, and loads with the sort that list gives. Its page is judged like the first one.
  • The bar follows later pages while they still carry the old default sort, and goes with Dismiss, a page that matches, or a retarget. It follows a rename, and a tab moved to another window keeps it.
  • Byte-length folding of a rerun, Fetch All and Share uses the column list the SQL was built on.
200 ms RTT, median of 5 Sorted open, main Sorted open, catalog hit Seed
PostgreSQL 17.11 427 ms 219 ms 220 ms
MariaDB 13.0.2 417 ms 210 ms 207 ms

Before, light and dark: the open waits for the column read and sorts by the current key.

Before
Before, dark

After, light and dark: the primary key moved from id to code after the catalog read it. The page opened on the catalog list and the bar offers Reload.

After
After, dark

Test plan

  • GlobalStateSuites/ColumnCatalogLoadTests (24), SQLSchemaProviderCatalogTests (7), SchemaRefreshServiceTests/autocompleteSyncSeedsTheColumnCatalog(), CatalogChangeServiceTests/changeIsBeingAppliedUntilItsTargetsFinish(): each fails on main or without its part of the change.
  • 75 suites that touch the changed types: 1,182 tests passed.
  • Debug build against local PostgreSQL: the open sorted by the stale key and showed the bar; Reload sorted by code and the bar went away.
  • Timings from the PostgreSQL and MariaDB drivers through a 200 ms RTT proxy.

@datlechin
datlechin enabled auto-merge (squash) November 19, 2026 18:10
@datlechin
datlechin merged commit 1e6ff82 into main Nov 19, 2026
11 checks passed
@datlechin
datlechin deleted the perf/column-catalog-third branch November 19, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant