Hi,
Creation of index of Animal is enough.

On Wed, Feb 12, 2014 at 12:44 PM, Riccardo Tasso
<[email protected]>wrote:

> Hi all,
>    I have an abstract Animal class and two children, Dog and Cat.
>
> In my application I have to execute the following queries:
>
> SELECT FROM Animal WHERE name = 'fluffy' AND age > 2
> SELECT FROM Dog WHERE name = 'fluffy' AND age > 2
> SELECT FROM Cat WHERE name = 'fluffy' AND age > 2
>
> To optimize query execution I think I should create a composite index on
> name and age. Should I create an index for each class (Animal, Dog, Cat) or
> just for the ancestor (Animal)?
>
> Thanks,
>    Riccardo
>
> --
>
> ---
> 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/groups/opt_out.
>



-- 
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/groups/opt_out.

Reply via email to