Skip to content

Instantly share code, notes, and snippets.

@vitorenesduarte
Created April 6, 2015 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vitorenesduarte/ec26a437836f6cf19665 to your computer and use it in GitHub Desktop.
Save vitorenesduarte/ec26a437836f6cf19665 to your computer and use it in GitHub Desktop.
EXPLAIN_NOTUNIQUE_HASH_INDEX
orientdb {db=MYDB}> explain select from Post where isFeatured = true limit -1
Profiled command '{limit:-1,compositeIndexUsed:1,involvedIndexes:[1],fullySortedByIndex:false,indexIsUsedInOrderBy:false,current:#16:711975,evaluated:975,fetchingFromTargetElapsed:45,documentReads:975,user:#5:0,documentAnalyzedCompatibleClass:975,recordReads:975,elapsed:50.846325,resultType:collection,resultSize:975}' in 0.053000 sec(s):
{"@type":"d","@version":0,"limit":-1,"compositeIndexUsed":1,"involvedIndexes":["Post.isFeatured"],"fullySortedByIndex":false,"indexIsUsedInOrderBy":false,"current":"#16:711975","evaluated":975,"fetchingFromTargetElapsed":45,"documentReads":975,"user":"#5:0","documentAnalyzedCompatibleClass":975,"recordReads":975,"elapsed":50.846325,"resultType":"collection","resultSize":975,"@fieldTypes":"compositeIndexUsed=l,involvedIndexes=e,current=x,evaluated=l,fetchingFromTargetElapsed=l,documentReads=l,user=x,documentAnalyzedCompatibleClass=l,recordReads=l,elapsed=f"}
orientdb {db=MYDB}> explain select from User where isFeatured = true limit -1
Profiled command '{limit:-1,compositeIndexUsed:1,involvedIndexes:[1],fullySortedByIndex:false,indexIsUsedInOrderBy:false,current:#11:45655,evaluated:195,fetchingFromTargetElapsed:13,documentReads:195,user:#5:0,documentAnalyzedCompatibleClass:195,recordReads:195,elapsed:15.056933,resultType:collection,resultSize:195}' in 0.016000 sec(s):
{"@type":"d","@version":0,"limit":-1,"compositeIndexUsed":1,"involvedIndexes":["User.isFeatured"],"fullySortedByIndex":false,"indexIsUsedInOrderBy":false,"current":"#11:45655","evaluated":195,"fetchingFromTargetElapsed":13,"documentReads":195,"user":"#5:0","documentAnalyzedCompatibleClass":195,"recordReads":195,"elapsed":15.056933,"resultType":"collection","resultSize":195,"@fieldTypes":"compositeIndexUsed=l,involvedIndexes=e,current=x,evaluated=l,fetchingFromTargetElapsed=l,documentReads=l,user=x,documentAnalyzedCompatibleClass=l,recordReads=l,elapsed=f"}
orientdb {db=MYDB}> explain select from Tag where isFeatured = true limit -1
Profiled command '{limit:-1,compositeIndexUsed:1,involvedIndexes:[1],fullySortedByIndex:false,indexIsUsedInOrderBy:false,current:#29:52,evaluated:4,fetchingFromTargetElapsed:1,documentReads:4,user:#5:0,documentAnalyzedCompatibleClass:4,recordReads:4,elapsed:1.072527,resultType:collection,resultSize:4}' in 0.002000 sec(s):
{"@type":"d","@version":0,"limit":-1,"compositeIndexUsed":1,"involvedIndexes":["Tag.isFeatured"],"fullySortedByIndex":false,"indexIsUsedInOrderBy":false,"current":"#29:52","evaluated":4,"fetchingFromTargetElapsed":1,"documentReads":4,"user":"#5:0","documentAnalyzedCompatibleClass":4,"recordReads":4,"elapsed":1.072527,"resultType":"collection","resultSize":4,"@fieldTypes":"compositeIndexUsed=l,involvedIndexes=e,current=x,evaluated=l,fetchingFromTargetElapsed=l,documentReads=l,user=x,documentAnalyzedCompatibleClass=l,recordReads=l,elapsed=f"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment