Il 02/07/2016 05:44, Luca Garulli ha scritto:
> Did you create an INDEX (non hash) against demo.age and an HASH_INDEX
> against drugname?

I have created an INDEX against demo.age and an HASH_INDEX on drug.drugname.

Now following query on MySQL:

select count(*) as total from drug, demo where drug.primaryid =
demo.primaryid and demo.age > 29 and demo.age < 46 and drug.drugname =
'TRIZIVIR'

require 58.08 sec and I expected this result.

The corresponding query on OrientDB:

select count(*) as total from ( select expand(in()) from demo where age
> 29 and age < 46 ) where drugname = 'TRIZIVIR'

require 47.804 sec(s).

Now you should think it is a good result, but in MySQL I have not
implemented indexes on attributes: if I define a BTREE index on demo.age
and an HASH index on drug.drugame the first query on MySQL require even
0.02 sec.

Do you think is correct or my OrientDB query is not correct?

-- 
Fabio Rinnone
Skype: fabiorinnone
Web: http://www.fabiorinnone.eu


-- 

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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to