Orientdb Time Span Search Query
In OrientDB I have setup a time series using this use case. However, instead of appending my Vertex as an embedded list to the respective hour I have opted to just create an edge f
Solution 1:
By experimenting and reading a bit about data types in orientdb, I found that :
The squared brackets allow to :
- filtering by one index, example out()[0]
- filtering by multiple indexes, example out()[0,2,4]
- filtering by ranges, example out()[0-9]
OPTION 1 (UPDATE) :
Using a union to join on multiple time is the only option if you don't want to create all indexes and if your range is small. Here is a query exemple using union in the documentation.
OPTION 2 :
If you always have all the indexes created for your time and if you filter on wide ranges, you should filter by ranges. This is more performant then option 1 for the cost of having to create all indexes on which you want to filter on. Official documentation about field part.
This is how the query would look like :
select*from
(
select
expand(hour[0-23].out())
from
(select
expand(month[3].day[20-29])
fromYearwhereyear=2015)
)
wheretimestamp>1406588622I would highly recommend reading this.
Post a Comment for "Orientdb Time Span Search Query"