Evaluating OrientDB, I'm trying to optimize a query that is running out of memory and pretty slow. I'm sure I must be doing something wrong.
Say I have a simple schema like the following:
+ name (String)
+ events (RIDBAG of log_event)
+ message (String)
+ level (int)
+ timestamp (Date)
and say I want to find all of the log events from a list of logs that have a specified level and order by timestamp...
I.e. "select from (select expand(log_events) from [#10:0, #10:1, #10:4]) where log_level = 1 ORDER BY timestamp ASC LIMIT 1000"
This works fine but when I start to get 100k+ records, things slow down and explode and such. I'm sure my query must be the problem.
So the question is, how can I "efficiently" query collections and get the OIdentifiable or ODocument that satisfy a given condition?
Also, I'm open to using the Java API if that is better...