-
Notifications
You must be signed in to change notification settings - Fork 871
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
orientdb count slow #3462
Comments
Like with RDBMS, create an index on "index" field:
Change UNIQUE to NOTUNIQUE in case you can have duplicates on "index" field. |
@lvca Property created successfully with id=1 orientdb {db=test}> create index v.index on V (index) UNIQUE Creating index... Index created successfully orientdb {db=test}> select count(*) from v where index between 9 and 329873 ----+------ 1 item(s) found. Query executed in 7.94 sec(s). it still 7.94 sec(s),while oracle take 0.078 sec(s). |
To be sure it's using the index, can you execute:
|
orientdb {db=test}> explain select count(*) from v where index between 9 and 329873 Profiled command '{limit:-1,compositeIndexUsed:1,fullySortedByIndex:false,evalua |
Does this changes anything?
|
orientdb {db=test}> select count(*) from v where index >= 9 and index <= 329873 ----+------ 1 item(s) found. Query executed in 7.673 sec(s). Profiled command '{limit:-1,compositeIndexUsed:1,fullySortedByIndex:false,evalua |
Ok, seems the SQL engine doesn't use the index properly. @luigidellaquila is it possible something is changed in the optimizator? |
+1 Even though the index appears to be used, the query still reads through all of the records, making any OrientDB version: 2.0.2 |
Any Progress on this? We are experiencing the same behaviour of indexes being used but the query still reading through the entire record data set which becomes particulary unusable on large data sets as mentioned by @tobiemh. We greatly appreciate a fix or a suggested work around. |
+1 for fix of this |
Happy new year. It's has been a more then a year. Milestones keep changing. The performance of indexes are crucial to database usage. Do you have a real ETA on this. Our company needs to make decision about back end and while some driver issues are ok to wait on index problems are not ok. Please help with info. |
+1 for fix of this, this is also related to #5945. |
+1 |
1 similar comment
+1 |
+1, this is mission critical for a lot of use cases. |
run |
@luigidellaquila any progress? |
+1 |
1 similar comment
+1 |
orientdb {db=test}> select count(*) from v where index > 9
----+------
|count
----+------
0 |399990
----+------
1 item(s) found. Query executed in 19.8 sec(s).
orientdb {db=test}> select count(*) from v where index between 2 and 344444
----+------
|count
----+------
0 |344443
----+------
1 item(s) found. Query executed in 14.263 sec(s).
it take much time to count by where conditions.
1、#1537
2、https://groups.google.com/forum/#!topic/orient-database/2KJuo6DShxI
but noting to me,what can i do?
The text was updated successfully, but these errors were encountered: