Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help on query using indexing of Edge #7433

Closed
DienNM opened this issue May 19, 2017 · 2 comments
Closed

Help on query using indexing of Edge #7433

DienNM opened this issue May 19, 2017 · 2 comments
Assignees
Labels

Comments

@DienNM
Copy link

DienNM commented May 19, 2017

OrientDB Version: 2.2.16

Java Version: 1.7

OS: Ubuntu

I do the query to get top of edges from given rid.
Product is vertex, Relation is Edge. "times" is a property of Relation that tracks the weight of relationship of 2 products.

I want to get top 10 of links with highest time. I do index on "times":
CREATE PROPERTY Relation.times LONG
CREATE INDEX Relation.times NOTUNIQUE_HASH_INDEX.

I did the query:
Select expand(bothE("Relation")) from Product where @Rid = '#70:04' Order by times DESC limit 10.

I got the warning: "fetched more than 50000" to speed up the execution, create an index or change the query to use an existent index.

I still have the result but it is slow. I thought it should apply Indexing in my case.

@luigidellaquila
Copy link
Member

Hi @DienNM

How many edges does that vertex have?
Could you please try the following and see if it performs better?

Select expand(bothE("Relation")) from #70:4 Order by times DESC limit 10

Thanks

Luigi

@DienNM
Copy link
Author

DienNM commented May 23, 2017

Thank you Luigi.

It works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants