docs/ddl/postgres.sql and the H2 test schema get two indexes:
ix_sql_workbench_result_snapshot_notebook on sql_workbench_result_snapshot (notebook_id). This column is the foreign key to the notebook, and it had no index. It is used by:
NotebookServicebyNotebook (snapshot list)
the notebook delete cascade (NotebookTableCustomizer, notebookId IN ids)
the snapshot join and child record lock
ix_sql_workbench_execution_notebook on sql_workbench_execution (notebook_id). The notebook page's "Runs" list (JOIN_NOTEBOOK_EXECUTION) joins on it.
Tests
PostgresIntegrationTest.testShippedDdlIndexesNotebookChildColumns applies the shipped DDL, then fails if any sql_workbench_ foreign-key column has no leading index. It also checks for the execution index. It fails without this change, reporting sql_workbench_result_snapshot.notebook_id.
./mvnw verify is green locally, including Testcontainers.
kof22 applies the same two indexes, by the same names, in its own changeset.
## What
`docs/ddl/postgres.sql` and the H2 test schema get two indexes:
- `ix_sql_workbench_result_snapshot_notebook` on `sql_workbench_result_snapshot (notebook_id)`. This column is the foreign key to the notebook, and it had no index. It is used by:
- `NotebookService` `byNotebook` (snapshot list)
- the notebook delete cascade (`NotebookTableCustomizer`, `notebookId IN ids`)
- the snapshot join and child record lock
- `ix_sql_workbench_execution_notebook` on `sql_workbench_execution (notebook_id)`. The notebook page's "Runs" list (`JOIN_NOTEBOOK_EXECUTION`) joins on it.
## Tests
- `PostgresIntegrationTest.testShippedDdlIndexesNotebookChildColumns` applies the shipped DDL, then fails if any `sql_workbench_` foreign-key column has no leading index. It also checks for the execution index. It fails without this change, reporting `sql_workbench_result_snapshot.notebook_id`.
- `./mvnw verify` is green locally, including Testcontainers.
kof22 applies the same two indexes, by the same names, in its own changeset.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
docs/ddl/postgres.sqland the H2 test schema get two indexes:ix_sql_workbench_result_snapshot_notebookonsql_workbench_result_snapshot (notebook_id). This column is the foreign key to the notebook, and it had no index. It is used by:NotebookServicebyNotebook(snapshot list)NotebookTableCustomizer,notebookId IN ids)ix_sql_workbench_execution_notebookonsql_workbench_execution (notebook_id). The notebook page's "Runs" list (JOIN_NOTEBOOK_EXECUTION) joins on it.Tests
PostgresIntegrationTest.testShippedDdlIndexesNotebookChildColumnsapplies the shipped DDL, then fails if anysql_workbench_foreign-key column has no leading index. It also checks for the execution index. It fails without this change, reportingsql_workbench_result_snapshot.notebook_id../mvnw verifyis green locally, including Testcontainers.kof22 applies the same two indexes, by the same names, in its own changeset.
🤖 Generated with Claude Code