Does this work? .hour.minute.log does not seem to expand, I get a count 
result of 0


On Thursday, October 1, 2015 at 5:56:35 AM UTC+1, Luigi Dell'Aquila wrote:
>
> Hi Simon,
>
> traversal operation requires vertex unmarshalling to find outgoing edges, 
> this is probably the main point where your operation consumes resources. 
> Traversal has to be fully executed for both returning results and counting, 
> so the performance is almost the same.
>
> I guess you can change your query a little bit to speed it up, try this:
>
> select count(*) from (SELECT expand (hour.minute.log) FROM (select 
> expand(month[9].day[29]) from year where label = '2015')) where device = 
> "VB7948"
> or even
>
> select count(*) from (select expand(month[9].day[29].hour.minute.log) from 
> year where label = '2015') where device = "VB7948"
>
> Thanks
>
> Luigi
>
> 2015-09-30 19:11 GMT+02:00 Simon White <[email protected] 
> <javascript:>>:
>
>> OrientDB version : 2.1.2
>>
>> I have set up a time series to store logging data from a number of my 
>> devices. I am seeing about a million log entries a day so the time series 
>> is set up to store by year, month, day, hour and minute (see forum entry 
>> 'Time Series Java API example and from docs 
>> http://orientdb.com/docs/2.1/Time-series-use-case.html)
>>
>> If I want to count *the total number of logs in a particular day, for a 
>> particular device *I use...
>>
>> select count(*) from (SELECT expand (log) FROM (TRAVERSE minute FROM 
>> (TRAVERSE hour FROM (select expand(month[9].day[29]) from year where label 
>> = '2015')))) where device = "VB7948"
>>
>> this takes about 100 seconds, which I guess is not too bad.
>>
>> However if I want to return the actual results i.e.
>>
>> select from (SELECT expand (log) FROM (TRAVERSE minute FROM (TRAVERSE 
>> hour FROM (select expand(month[9].day[29]) from year where label = 
>> '2015')))) where device = "VB7948"
>> this too takes about 100 seconds, which seems very reasonable when we 
>> consider it is returning a million entries!
>>
>> So my question - why is count not any faster?
>>
>> When I execute a similar query on my old RDBMS (involving comparisions of 
>> timestamps from a single large table) OrientDB outperforms on the select 
>> statement (yay!) but the RDBMS can execute the count in half the time.
>>
>> Am I doing something silly?
>>
>>
>>
>> -- 
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to