arangosh> db._profileQuery(` ........> LET list = (FOR doc in acollection FILTER doc.value > 90 RETURN doc) ........> FOR a IN list ........> FILTER a.value < 91 ........> RETURN a`, {}, {colors: false, optimizer:{rules:["-all"]}} ........> ); Query String (116 chars, cacheable: false): LET list = (FOR doc in acollection FILTER doc.value > 90 RETURN doc) FOR a IN list FILTER a.value < 91 RETURN a Execution plan: Id NodeType Calls Items Runtime [s] Comment 1 SingletonNode 1 1 0.00000 * ROOT 7 SubqueryNode 1 1 0.01107 - LET list = ... /* const subquery */ 2 SingletonNode 1 1 0.00000 * ROOT 3 EnumerateCollectionNode 10 10000 0.00330 - FOR doc IN acollection /* full collection scan */ 4 CalculationNode 10 10000 0.00257 - LET #5 = (doc.`value` > 90) /* simple expression */ /* collections used: doc : acollection */ 5 FilterNode 10 9909 0.00307 - FILTER #5 6 ReturnNode 10 9909 0.00210 - RETURN doc 8 EnumerateListNode 10 9909 0.00182 - FOR a IN list /* list iteration */ 9 CalculationNode 10 9909 0.00254 - LET #7 = (a.`value` < 91) /* simple expression */ 10 FilterNode 1 0 0.00135 - FILTER #7 11 ReturnNode 1 0 0.00000 - RETURN a Indexes used: none Optimization rules applied: none Query Statistics: Writes Exec Writes Ign Scan Full Scan Index Filtered Exec Time [s] 0 0 10000 0 10000 0.01873 Query Profile: Query Stage Duration [s] initializing 0.00001 parsing 0.00005 optimizing ast 0.00001 loading collections 0.00001 instantiating plan 0.00002 optimizing plan 0.00011 executing 0.01679 finalizing 0.00171