Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove redundant indices #27587

Merged
merged 1 commit into from
Nov 12, 2024
Merged

remove redundant indices #27587

merged 1 commit into from
Nov 12, 2024

Conversation

freben
Copy link
Member

@freben freben commented Nov 11, 2024

This is on top of #27341

The time has come to remove these indices, that are lingering around for historical reasons. At this point people should have had enough time to migrate after #22594 to have that deferred index into place.

Ping @drodil and @Rugvip here too.

For reference, here follows a dump of indices on a postgres installation before the PR:

final_entities:

index query
entity_ref_idx CREATE INDEX entity_ref_idx
ON public.final_entities
USING btree (entity_ref)
final_entities_entity_id_idx CREATE INDEX final_entities_entity_id_idx
ON public.final_entities
USING btree (entity_id)
final_entities_pkey CREATE UNIQUE INDEX final_entities_pkey
ON public.final_entities
USING btree (entity_id)

refresh_state:

index query
refresh_state_entity_id_idx CREATE INDEX refresh_state_entity_id_idx
ON public.refresh_state
USING btree (entity_id)
refresh_state_entity_ref_idx CREATE INDEX refresh_state_entity_ref_idx
ON public.refresh_state
USING btree (entity_ref)
refresh_state_entity_ref_uniq CREATE UNIQUE INDEX refresh_state_entity_ref_uniq
ON public.refresh_state
USING btree (entity_ref)
refresh_state_next_stitch_at_idx CREATE INDEX refresh_state_next_stitch_at_idx
ON public.refresh_state
USING btree (next_stitch_at)
WHERE (next_stitch_at IS NOT NULL)
refresh_state_next_update_at_idx CREATE INDEX refresh_state_next_update_at_idx
ON public.refresh_state
USING btree (next_update_at)
refresh_state_pkey CREATE UNIQUE INDEX refresh_state_pkey
ON public.refresh_state
USING btree (entity_id)

search:

index query
search_entity_id_idx CREATE INDEX search_entity_id_idx
ON public.search
USING btree (entity_id)
search_key_idx CREATE INDEX search_key_idx
ON public.search
USING btree (key)
search_key_original_value_idx CREATE INDEX search_key_original_value_idx
ON public.search
USING btree (key, original_value)
search_key_value_idx CREATE INDEX search_key_value_idx
ON public.search
USING btree (key, value)
search_value_idx CREATE INDEX search_value_idx
ON public.search
USING btree (value)

refresh_state_references:

index query
refresh_state_references_pkey CREATE UNIQUE INDEX refresh_state_references_pkey
ON public.refresh_state_references
USING btree (id)
refresh_state_references_source_entity_ref_idx CREATE INDEX refresh_state_references_source_entity_ref_idx
ON public.refresh_state_references
USING btree (source_entity_ref)
refresh_state_references_source_key_idx CREATE INDEX refresh_state_references_source_key_idx
ON public.refresh_state_references
USING btree (source_key)
refresh_state_references_target_entity_ref_idx CREATE INDEX refresh_state_references_target_entity_ref_idx
ON public.refresh_state_references
USING btree (target_entity_ref)

@freben freben requested review from a team as code owners November 11, 2024 16:16
@freben freben requested review from jhaals and camilaibs and removed request for a team November 11, 2024 16:16
@github-actions github-actions bot added the area:catalog Related to the Catalog Project Area label Nov 11, 2024
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
@freben freben force-pushed the freben/remove-redundant-relations branch from 0090d45 to 34d4360 Compare November 12, 2024 08:32
Base automatically changed from blam/move-refresh-state to master November 12, 2024 10:08
@freben freben merged commit 7bedf44 into master Nov 12, 2024
17 checks passed
@freben freben deleted the freben/remove-redundant-relations branch November 12, 2024 15:54
Copy link
Contributor

Thank you for contributing to Backstage! The changes in this pull request will be part of the 1.33.0 release, scheduled for Tue, 19 Nov 2024.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:catalog Related to the Catalog Project Area
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants