Hi there,

this query 

 for doc in import 
   filter doc._type == 'Image'
   return {path: doc._path, key: doc._key}

takes about 45 seconds on decent hardware with an import collection of 
about 100.000 items with about 21.000 of _type = 'Image'.
There is an index of _type. Using PyArango as client...I really wander why 
this query is running so slow?!

Running ArangoDB 3.4.3

Profile

Query String:
 for doc in import 
 filter doc._type == 'Image'
 return {path: doc._path, key: doc._key}

Execution plan:
 Id   NodeType          Calls   Items   Runtime [s]   Comment
  1   SingletonNode         1       1       0.00000   * ROOT
  7   IndexNode            21   20617      32.73956     - FOR doc IN 
import   /* hash index scan, projections: `_key`, `_path` */
  5   CalculationNode      21   20617       0.04354       - LET #3 = { 
"path" : doc.`_path`, "key" : doc.`_key` }   /* simple expression */   /* 
collections used: doc : import */
  6   ReturnNode           21   20617       0.00016       - RETURN #3

Indexes used:
 By   Type   Collection   Unique   Sparse   Selectivity   Fields        
Ranges
  7   hash   import       false    false         0.05 %   [ `_type` ]  
 (doc.`_type` == "Image")

Optimization rules applied:
 Id   RuleName
  1   move-calculations-up
  2   move-filters-up
  3   move-calculations-up-2
  4   move-filters-up-2
  5   use-indexes
  6   remove-filter-covered-by-index
  7   remove-unnecessary-calculations-2
  8   reduce-extraction-to-projection

Query Statistics:
 Writes Exec   Writes Ign   Scan Full   Scan Index   Filtered   Exec Time 
[s]
           0            0           0        20617          0        
32.78928

Query Profile:
 Query Stage           Duration [s]
 initializing               0.00001
 parsing                    0.00010
 optimizing ast             0.00001
 loading collections        0.00002
 instantiating plan         0.00005
 optimizing plan            0.00032
 executing                 32.78841
 finalizing                 0.00032

-- 
You received this message because you are subscribed to the Google Groups 
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/arangodb/6c2de54c-3936-4aa5-8b6a-2dae3e5afcf7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to