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

Add new number datatypes (integer) to increase performance #132

Open
Percy2Live opened this issue Jul 7, 2020 · 2 comments
Open

Add new number datatypes (integer) to increase performance #132

Percy2Live opened this issue Jul 7, 2020 · 2 comments

Comments

@Percy2Live
Copy link

Currently the sql adapter only distinguishes between "Text", "Number" and "Bool". E.g. when selecting "Number" the data type in the created database is set to float. For most applications this works fine. Unfortunately I found out that there are some applications where it's a big downsize to store all numbers as float. I have a photovoltaik energy monitor which creates several hundred data points during a day. These data points are visualized in a graph by using Grafana.

The main issue with storing these values as float is that the performance of the database is very poor. A comparison to a database with plain integer values shows that the performance is significantly better with integers.

This also applies for some other applications where I noticed that the performance of the database (for number values) is not as good as it could be. Therefore it would be great if you could choose what kind of data type should be used.

@Apollon77
Copy link
Contributor

How a float schout be converted to int? Normal "round" logic (.5 up, else down?)

@Percy2Live
Copy link
Author

Normal round logic should be sufficient for most applications. In case the original value isn't a decimal value but an integer, it doesn't even matter at all.

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

No branches or pull requests

2 participants