Its interesting that min and max are not optimized. Thank you Fabrizio.

понедельник, 4 августа 2014 г., 21:56:21 UTC+1 пользователь Fabrizio 
Fortino написал:
>
> Hi Vladimir,
>
> AFAIK min and max functions are not optimised for this kind of cases.
> As a workaround you could try this
>
> select ID from CustomType order by ID limit 1 
>
> Cheers,
> Fabrizio
>
> On Monday, August 4, 2014 5:59:07 PM UTC+1, Vladimir Ziankevich wrote:
>>
>> Hi all!
>>
>> There are about 600 000 vertices of specific type (let say CustomType) in 
>> my graph database. Also CustomType have unique LONG field 'ID'. I've 
>> created index for this field (create index customtype_id on CustomType (ID) 
>> unique).
>> So searching through the IDs (
>> select from CustomType where ID=...
>> ) is pretty quick (~0.05s).
>>
>> But when I execute the next query
>> select min(ID) from CustomType
>> it takes more than one minute. 
>>
>> I have expected that min() function should work as fast as search by 
>> field itself.
>>
>> Isn't it a bug?
>>
>> Thanks in advance.
>>
>

-- 

--- 
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