Skip to content

add missing indexes#813

Open
EtienneLt wants to merge 3 commits into
mainfrom
add-missing-indexes
Open

add missing indexes#813
EtienneLt wants to merge 3 commits into
mainfrom
add-missing-indexes

Conversation

@EtienneLt
Copy link
Copy Markdown
Contributor

PR Summary

  • add indexes on foreign keys references because there are seq scan on these column

Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
@EtienneLt EtienneLt self-assigned this May 13, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Review Change Stack

Warning

Rate limit exceeded

@EtienneLt has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 44 minutes and 38 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c78e432f-dc7a-4aa9-b160-082a44849d9b

📥 Commits

Reviewing files that changed from the base of the PR and between 3737b15 and e17ea18.

📒 Files selected for processing (1)
  • src/main/resources/db/changelog/changesets/changelog_20260513T140000Z.xml
📝 Walkthrough

Walkthrough

This PR adds a database migration that creates missing indexes across multiple tables for performance optimization. A new Liquibase changelog file defines the indexes, and the master changelog is updated to register this migration in the execution sequence.

Changes

Database Indexes

Layer / File(s) Summary
Batch index creation changelog
src/main/resources/db/changelog/changesets/changelog_20260513T140000Z.xml
New Liquibase changeSet addMissingIndexes creates indexes on voltage level topology/modification relations, filter deletion filters, RCC points, voltage level topology switch kinds, LCC converter station modifications, line type limits, modification application UUIDs, move feeder bay modifications, and variation filter assignments.
Changelog registration
src/main/resources/db/changelog/db.changelog-master.yaml
Master changelog is updated to include the new index creation changeSet with relative file path reference.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'add missing indexes' directly and clearly summarizes the main change: adding database indexes via a new Liquibase changelog file.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose of adding indexes on foreign key reference columns to address sequential scans.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/main/resources/db/changelog/changesets/changelog_20260513T140000Z.xml`:
- Around line 4-6: Several index names in the changelog XML exceed PostgreSQL's
63-char limit and must be shortened: update the createIndex indexName attributes
for the following entries to unique names under 63 chars—replace
boolean_equipment_attribute_modification_voltage_level_topology_modification_id_idx
with boolean_eq_attr_mod_vltm_id_idx (or similar <63 chars) for table
boolean_equipment_attribute_modification; replace
converter_station_creation_rcc_points_converter_station_creation_entity_id_idx
with conv_st_creation_rcc_points_entity_id_idx for table
converter_station_creation_rcc_points; replace
converter_station_modification_rcc_points_converter_station_modification_entity_id_idx
with conv_st_mod_rcc_points_entity_id_idx for table
converter_station_modification_rcc_points; replace
create_voltage_level_topology_switch_kinds_create_voltage_level_topology_id_idx
with vlt_switch_kinds_vlt_id_idx for table
create_voltage_level_topology_switch_kinds; replace
lcc_converter_station_modification_on_side_lcc_converter_station_modification_id_idx
with lcc_conv_st_mod_on_side_id_idx for table
lcc_converter_station_modification_on_side; and replace
shunt_compensator_on_side_lcc_converter_station_creation_entity_id_idx with
shunt_comp_on_side_conv_st_creation_id_idx for table shunt_compensator_on_side;
ensure each new name is unique, under 63 chars, update any references or tests
that expect the old names, and run migrations locally to confirm no collisions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6129f709-be5e-412c-a82e-09d56fb16a79

📥 Commits

Reviewing files that changed from the base of the PR and between fc4912f and 3737b15.

📒 Files selected for processing (2)
  • src/main/resources/db/changelog/changesets/changelog_20260513T140000Z.xml
  • src/main/resources/db/changelog/db.changelog-master.yaml

Comment thread src/main/resources/db/changelog/changesets/changelog_20260513T140000Z.xml Outdated
EtienneLt added 2 commits May 13, 2026 13:09
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
@sonarqubecloud
Copy link
Copy Markdown

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