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

Improve foreign key index ordering #67

Open
danpalmer opened this issue May 1, 2018 · 0 comments
Open

Improve foreign key index ordering #67

danpalmer opened this issue May 1, 2018 · 0 comments

Comments

@danpalmer
Copy link
Contributor

We have a foreign key constraint that references (label, state_machine). This has a corresponding btree index, where the ordering of the components of the contraint matter.

This means that queries, which typically filter on state machines, are often taking much longer than they need to because they can't use the index to filter history entries.

We should reverse the order of the components in the foreign key constraint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant