-
Notifications
You must be signed in to change notification settings - Fork 26
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
Support for TimescaleDB (Postgres extension) [PATCH] #205
Comments
How the quwries exactly need to look? Did you tried it out manually? |
not yet because I could not get an up to date Psql to work on my raspi using packages, there were too many dependancy errors. |
hm ... but then it is very difficult to verify that a change works if I would do them because Ialso do not use postgrSQL at all on my system ... Ok, lets see when someone finds time: For testing: maybe use https://hub.docker.com/r/timescale/timescaledb image as test target |
Sorry, but that's not already all :-( |
Weird. I seem to recall I got this working on a PC VM, but eventually gave up on my Raspi IoT device because of packaging issues. Maybe the syntax has changed? |
Probably it's because a Unix timestamp (integer) is used for the timestamp instead of a
https://docs.timescale.com/api/latest/hypertable/create_hypertable/ So the call should be something like this: SELECT create_hypertable('timeseries_table_name', 'timestamp_column', chunk_time_interval => 604800000); Where 604800000 means to store data for 7 days * 86400 sec/day * 1000 ms/s per chunk. That's the default. See also: https://docs.timescale.com/use-timescale/latest/hypertables/about-hypertables#best-practices-for-time-partitioning |
Is your feature request related to a problem? Please describe.
Traditional SQL databases can handle time series data only to a certain extent.
Timescale is a Postgres extension which optimizes Postgresql tables for time series data, allowing more and faster time range related requests and making these easier.
Describe the solution you'd like
I would like iobroker to offer a checkbox during setup "Use TimescaleDB extension" when setting up Postgres, and if the user chooses to do this, execute this command once for each table containing time series data during database creation:
This is already all. Users can then use Timescale functions and features during requests, but inserting data is not changed.
Describe alternatives you've considered
Alternatively this would have to be done manually for each table using ˋpsqlˋ.
Additional context
This feature would make it more clearly visible that there are traditional SQL database options for time series data. Influxdb is the obvious choice for many people but it has drawbacks that may make users look for time series capable alternatives. This woul make one such alternative obvious.
The text was updated successfully, but these errors were encountered: