Hi guys,
Working with OrientDB 1.6.4 I have noticed slowness when I perform the
following query
select max(timestamp) from myclass
----+-----+-------------
# |@RID |max
----+-----+-------------
0 |#-2:0|1393969801000
----+-----+-------------
1 item(s) found. Query executed in 0.819 sec(s).
The class contains around 5000 record and the timestamp field is a LONG
with a NOTUNIQUE index.
Here is the explain plan
Profiled command
'{projectionElapsed:0,optimizationElapsed:0,groupByElapsed:0,current:#37:5019,fetchingFromTargetElapsed:524,documentReads:5020,documentAnalyzedCompatibleClass:5020,recordReads:5020,elapsed:524.391,resultType:collection,resultSize:1}'
in 0.526000 sec(s):
{"@type":"d","@version":0,"projectionElapsed":0,"optimizationElapsed":0,
"groupByElapsed":0,"current":"#37:5019","fetchingFromTargetElapsed":524,
"documentReads":5020,"documentAnalyzedCompatibleClass":5020,"recordReads":
5020,"elapsed":524.391,"resultType":"collection","resultSize":1,
"@fieldTypes":
"projectionElapsed=l,optimizationElapsed=l,groupByElapsed=l,fetchingFromTargetElapsed=l,documentReads=l,documentAnalyzedCompatibleClass=l,recordReads=l,elapsed=f"
}
Since the timestamp property in indexed should the query perform a "more
smarter" search instead of reading all the documents in the class?
Cheers,
Fabrizio
--
---
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/groups/opt_out.