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

perf(sql): Add indexes on correlated execution ids for faster deletes #2924

Merged
merged 1 commit into from
May 20, 2019

Conversation

robzienert
Copy link
Member

No description provided.

it.delete(table("correlation_ids")).where(field(correlationField).eq(ulid)).execute()
it.delete(type.stagesTableName).where(field("execution_id").eq(ulid)).execute()
it.delete(table("correlation_ids")).where(field("id").eq(
it.select(field("id")).from("correlation_ids")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the lists of correlation_ids.id and pipeline|orchestration_stages.ids should be fetched as individual queries outside of the transactional, followed by a transaction that deletes from the 3 tables by primary key with a single execute().

@robzienert robzienert merged commit 6cdb446 into spinnaker:master May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants