Hi there,

I am investigating Phoenix as a potential data-store for time-series data
on sensors.
What I am really interested in, as a first milestone, is to have efficient
time range queries for a particular sensor. From those queries the results
would consist of 1 or 2 columns (so small rows).
I was looking on some advice about the schema design and indexes.
What I have done so far:

CREATE TABLE VALUES (dt bigint not null,sid varchar not null, us double,
gen double CONSTRAINT PK PRIMARY KEY(dt,sid)) COMPRESSION='GZ',
SALT_BUCKETS=120

loaded the data and performed queries like:

SELECT DT,US,GEN FROM VALUES WHERE DT>=1369676800000 AND DT <=
1370000800000 AND SID='ID1'

Is this the optimal way to go?

Thanks a lot

Reply via email to