Skip to content

perf(export): read the Data Dictionary's columns, keys and indexes once per schema - #4350

Merged
datlechin merged 18 commits into
mainfrom
feat/pluginkit-batch-statements
Nov 19, 2026
Merged

datlechin merged 18 commits into
mainfrom
feat/pluginkit-batch-statements

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • P19: the Data Dictionary reads columns, foreign keys and indexes once per export group, where the driver declares that read answers each table as its own read does. A table such a read leaves out has no indexes or keys.
  • P19: a group read that fails, or that reaches the 5,000,000 row limit, falls back to the table-by-table reads, so a failure still names its table.
  • P19: PostgreSQL declares columns, foreign keys and indexes: each bulk query is the per-table query without its table predicate, decoded by the same row reader. No other driver declares any yet.
  • PluginKit, additive: PluginExportBulkReads, PluginDatabaseDriver.exportBulkReads (default empty), PluginExportDataSource.bulkReads and fetchAllIndexes(databaseName:) (defaults empty). Kit 46, minimum 19.
  • P16, P17, P18: not in this PR. A batch can only stop at a server error: a row-count check (grid saves, Data Sync) sees its count after later statements already ran, and SQL import reads the file ahead with the session's text rules before the batch runs. MySQL's mysql_send_query cannot stop at the first failure at all.
  • P20: not in this PR.

Test plan

  • New DataDictionaryGroupReadTests: one read per kind for a group, the same Markdown as table-by-table reads, fallback after a failed group read, a read at the row limit set aside, a one-object group read alone.
  • DataDictionaryExportTests, the ExportDataSourceAdapter* suites and MaskingExportTests pass unchanged.
  • verify.sh abi: changed baseline, no break, kit 46 against v0.88.0-beta.1's 45.
  • PostgreSQL 17.11 at 200 ms RTT, the dictionary's reads for 50 tables through this branch's driver: 51,978 ms table by table, 11,053 ms with the group reads, the same names, types, indexes, keys and comments.

@datlechin
datlechin enabled auto-merge (squash) November 19, 2026 11:10
@datlechin
datlechin merged commit 57f783d into main Nov 19, 2026
11 checks passed
@datlechin
datlechin deleted the feat/pluginkit-batch-statements branch November 19, 2026 13:39
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