Could you provide database sample ?

On Tue, Apr 8, 2014 at 8:51 AM, Wise Jack <[email protected]> wrote:

> Hi, Andrey.
>
> Thanks for your reply. The memory information is as below:
>
> [root@root ~]# cat /proc/meminfo
> MemTotal:        8063160 kB
> MemFree:          228968 kB
>
> As you can see
>
>      "involvedIndexes":["ClassA.fieldA"],
>      "current":"#11:960477",
>      "fetchingFromTargetElapsed":160596,
>      "documentReads":959211,
>
> Even the database can see the index, but it still iterate all the
> documents in the database, I think that's the reason for the slow.
>
> The same data in mysql(that using fieldA's index), can return data in
> 0.015second, so I think this is not the fault of the data, maybe there is a
> better way for creating index or querying using index for embedded list of
> OrientDB.
>
> On Monday, April 7, 2014 5:25:27 PM UTC+8, Andrey Lomakin wrote:
>
>> Yes too slow.
>> What amount of RAM do you have ?-
>>
>>
>> On Mon, Apr 7, 2014 at 5:33 AM, Wise Jack <[email protected]> wrote:
>>
>>> I'm testing orientdb for a storage database of a knowledge base.
>>>
>>> The database can be something like this:
>>>
>>> [
>>>     {
>>>         fieldA: ['a','b','c']
>>>     },
>>>     {
>>>         fieldA: ['c','d','e']
>>>     },
>>> ]
>>>
>>>
>>> and the query is something like this:
>>>
>>> select from ClassA where 'c' in fieldA
>>>
>>>
>>> The query is very very slow, the explain of the query is as below
>>>
>>> {
>>>     "@type":"d","@version":0,
>>>      "involvedIndexes":["ClassA.fieldA"],
>>>      "current":"#11:960477",
>>>      "fetchingFromTargetElapsed":160596,
>>>      "documentReads":959211,
>>>      "documentAnalyzedCompatibleClass":959211,
>>>      "recordReads":959211,
>>>      "elapsed":160596.25,
>>>      "resultType":"collection",
>>>      "resultSize":1,
>>>      
>>> "@fieldTypes":"involvedIndexes=e,fetchingFromTargetElapsed=l,documentReads=l,documentAnalyzedCompatibleClass=l,recordReads=l,elapsed=f"
>>>  }
>>>
>>> As you can see, even OrientDB used the fieldA index, it still costs 16
>>> seconds to query a million records, it is unacceptable.
>>>
>>> Is there any good way to make this query faster?
>>>
>>> https://stackoverflow.com/questions/22896528/embedded-
>>> list-query-performance-in-orientdb
>>>
>>> --
>>>
>>> ---
>>> 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/d/optout.
>>>
>>
>>
>>
>> --
>> Best regards,
>> Andrey Lomakin.
>>
>> Orient Technologies
>> the Company behind OrientDB
>>
>>   --
>
> ---
> 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/d/optout.
>



-- 
Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB

-- 

--- 
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/d/optout.

Reply via email to