Re: [orientdb] Can OrientDB use indexes for filtering and sorting on a subquery result?

2014-06-10 Thread Artem Orobets
Hi Wouter, Lightweight edge is the edge that does not created as a record in an underlying database. By default OrientDB optimize all edges without properties to lightweight. Best regards, Artem Orobets * Orient Technologiesthe Company behind OrientDB* 2014-06-10 13:34 GMT+03:00 Wouter de Vaal

Re: [orientdb] Can OrientDB use indexes for filtering and sorting on a subquery result?

2014-06-10 Thread Wouter de Vaal
Hi Artem, Thanks for the info. Do I understand correctly that a lightweight edge is an edge without any properties? Wouter Op dinsdag 10 juni 2014 12:27:14 UTC+2 schreef Artem Orobets: > > Hi Wouter, > > Would it be possible to create an index over multiple classes including >> the relations o

Re: [orientdb] Can OrientDB use indexes for filtering and sorting on a subquery result?

2014-06-10 Thread Artem Orobets
Hi Wouter, Would it be possible to create an index over multiple classes including the > relations or something like that? No, automatic indexing over multiple classes is not supported. You can try to play with a composite index over in_ARTICLE_SUPP_NR and other field and do select from article

Re: [orientdb] Can OrientDB use indexes for filtering and sorting on a subquery result?

2014-06-10 Thread Wouter de Vaal
Hi Artem, Thanks, I thought as much. One approach for us would be to denormalize data, but I am looking if there exists a way where I wouldn't need to maintain multiple classes/indexes for this to work. Would it be possible to create an index over multiple classes including the relations or s

Re: [orientdb] Can OrientDB use indexes for filtering and sorting on a subquery result?

2014-06-10 Thread Artem Orobets
Hi Wouter, It is not really that easy to improve performance of subquery with index. Because in a sub-query you select records from subset created somehow but not from class. General approach in this case is to rewrite your query in more efficient way, change schema or create a manual index. Cert

[orientdb] Can OrientDB use indexes for filtering and sorting on a subquery result?

2014-06-10 Thread Wouter de Vaal
Hi, We have an ARTICLE -> SUPPLIER -> COUNTRY database, with loads of ARTICLE records, quite a few SUPPLIER records and some COUNTRY records. Now if we want to filter on articles with a supplier in a certain country we can do this fast enough by querying like this: select from (select expand(i