Re: [orientdb] Uniqe Index in SubClasses

2016-07-28 Thread Luigi Dell'Aquila
Of course this is true only if the parent class is empty, otherwise you have to define a non-unique index on the parent class as well Thanks Luigi 2016-07-28 8:58 GMT+02:00 Luigi Dell'Aquila : > There is just no need to define indexes on the parent class, as long

Re: [orientdb] Uniqe Index in SubClasses

2016-07-28 Thread Luigi Dell'Aquila
There is just no need to define indexes on the parent class, as long as you have indexes on the same properties on the subclass. Eg. if you have a class A with two subclasses A1 and A2 and both subclasses have an index on "name", if you do a SELECT FROM A WHERE name = 'foo' it will use the

Re: [orientdb] Uniqe Index in SubClasses

2016-07-28 Thread hartmut bischoff
Thanks for the quick response. Unfortunately, this leads to other Questions, probably due to a lac of skills on my side 1. How does this affect queries based on the superclass? The Match-Query presented in another topic is already slow. 2. Do I have to define two indexes, one on the

Re: [orientdb] Uniqe Index in SubClasses

2016-07-28 Thread Luigi Dell'Aquila
Hi Hartmut, There is no specific configuration to specify that an index is unique at class level, but you can just avoid to define the index on the superclass, as the query engine will use the subclasses index if needed (first level inheritance only) Thanks Luigi 2016-07-28 7:07 GMT+02:00

[orientdb] Uniqe Index in SubClasses

2016-07-27 Thread hartmut bischoff
As mentioned before, my test-suite-Vertices have the following structure: - V - - - Contract - - ContractDetail - - Sector - - Category - Industry - Subcategory Contracts got an unique Index "Con_id" and Sector "name". names are unique on class-level only. My