Hi,

I am not an arango dev, so i don't know why it is so slow. I do know that
if you add a 'view' and use the 'search' instead of 'filter', it will be
fast.

Jamez

On Fri, 14 Jun 2019, 08:41 Andreas Jung, <[email protected]> wrote:

> _key is a UUID4
> _path is standard filesystem path not longer than 100 chars each
>
> That can not be the problem.
>
> Am Freitag, 14. Juni 2019 09:36:17 UTC+2 schrieb James Courtier-Dutton:
>>
>> Hi,
>>
>> What is the average size of the returned data? It could just be the time
>> it takes to serialise the data being returned
>>
>> James
>>
>> On Fri, 14 Jun 2019, 05:45 'Andreas Jung' via ArangoDB, <
>> [email protected]> wrote:
>>
>>> 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
>>> <https://groups.google.com/d/msgid/arangodb/6c2de54c-3936-4aa5-8b6a-2dae3e5afcf7%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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/e03caccb-2753-47b4-b52a-25f8496a6469%40googlegroups.com
> <https://groups.google.com/d/msgid/arangodb/e03caccb-2753-47b4-b52a-25f8496a6469%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAAMvbhGbBjog%3DGtbcCpqhBRfowop6Hg7yzUckNeMQE-SWwqZ5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to