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

Change belief horizon column type to int to save space #181

Open
nhoening opened this issue Jun 7, 2024 · 0 comments
Open

Change belief horizon column type to int to save space #181

nhoening opened this issue Jun 7, 2024 · 0 comments
Labels
Database support Dealing with databases

Comments

@nhoening
Copy link
Contributor

nhoening commented Jun 7, 2024

The belief horizon column takes 16 bytes, but could also store minutes/seconds as integer, which would reduce 12 bytes per belief, which certainly a fifth of all our data size.

We need to find out how to migrate this (in the code/ORM data model, which should lead to an alembic migration).

Then, we need to know how timely-beliefs can translate this from and into a timedelta:

  • in input, we need to translate timedelta to int when a BeliefsDataFramw is created and in querying - query logic should still work the same, we only need to translate timedeltas to integer if a belief horizon parameter is given
  • in its output, it would be best to only translate (to timedelta) when someone accesses this column in the BeliefsDataFrame
@nhoening nhoening changed the title Change belief horizon column type Change belief horizon column type to int to save space Jun 7, 2024
@nhoening nhoening added the Database support Dealing with databases label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Database support Dealing with databases
Projects
None yet
Development

No branches or pull requests

1 participant