Skip to content

[TASK] Reuse sequence metadata in database snapshots - #757

Open
wouter90 wants to merge 1 commit into
TYPO3:mainfrom
wouter90:perf/snapshot-sequence-metadata
Open

wouter90 wants to merge 1 commit into
TYPO3:mainfrom
wouter90:perf/snapshot-sequence-metadata

Conversation

@wouter90

Copy link
Copy Markdown
Contributor

Record auto-increment column names during snapshot export and pass them to the existing sequence reset helper when restoring rows. Skip sequence resets for tables without an auto-increment column.

This avoids repeated PostgreSQL catalog queries and restores generated IDs correctly for quoted mixed-case columns. Add functional coverage for ordinary and custom ID columns, repeated restores and non-sequence tables.

A local PostgreSQL 17 benchmark of SlugLinkGeneratorTest drops from 46.93 s to 42.37 s with the same 194 tests and 202 assertions. The number of sequence catalog lookups drops from 2,123 to zero.

Record auto-increment column names during snapshot export and pass them
to the existing sequence reset helper when restoring rows. Skip sequence
resets for tables without an auto-increment column.

This avoids repeated PostgreSQL catalog queries and restores generated
IDs correctly for quoted mixed-case columns. Add functional coverage for
ordinary and custom ID columns, repeated restores and non-sequence tables.

A local PostgreSQL 17 benchmark of SlugLinkGeneratorTest drops from
46.93 s to 42.37 s with the same 194 tests and 202 assertions. The number
of sequence catalog lookups drops from 2,123 to zero.

WIP: prepared for CI validation.
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