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

filemanager: partition record state #614

Open
1 of 2 tasks
mmalenic opened this issue Oct 24, 2024 · 0 comments
Open
1 of 2 tasks

filemanager: partition record state #614

mmalenic opened this issue Oct 24, 2024 · 0 comments
Assignees
Labels
feature New feature filemanager an issue relating to the filemanager

Comments

@mmalenic
Copy link
Member

mmalenic commented Oct 24, 2024

Queries using the current state logic here are already a bit slow, and will only get slower as the number of records grows. This is because the filemanager never deletes records, even though records transition from current to historical data.

This can be improved by partitioning the records by historical and current state, which should improve the speed of queries on the current state. In order to do this a new column should be added that can be used to split the data.

Tasks:

  • Add new is_current_state column and adjust the API to use it.
  • Partition the records on the new column.
    • This will involve some complexity because the table needs to be recreated. Also, in postgres, globally unique constraints can't apply across partitions which will affect the event de-duplication logic.
@mmalenic mmalenic self-assigned this Oct 24, 2024
@mmalenic mmalenic added feature New feature filemanager an issue relating to the filemanager labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature filemanager an issue relating to the filemanager
Projects
None yet
Development

No branches or pull requests

1 participant