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

Selecting RID from indexes is very slow #3278

Closed
AaronSchulz opened this issue Dec 25, 2014 · 5 comments
Closed

Selecting RID from indexes is very slow #3278

AaronSchulz opened this issue Dec 25, 2014 · 5 comments
Assignees
Labels

Comments

@AaronSchulz
Copy link

select key from index:ProperyIdIdx limit 1000

Takes .006 seconds

select key,rid from index:ProperyIdIdx limit 1000

Takes 7.331 seconds

select rid from index:ProperyIdIdx limit 1000

Takes 7.249 seconds

select from index:ProperyIdIdx limit 1000

Takes 7.191 seconds

The index has about ~1300 records.

@AaronSchulz
Copy link
Author

This might be limited to the console, at least it seems faster using the HTTP SQL API.

@lvca
Copy link
Member

lvca commented Dec 26, 2014

Right, try with explain as prefix.

@lvca lvca assigned lvca and unassigned andrii0lomakin Dec 26, 2014
@lvca lvca added this to the 2.0 Final milestone Dec 26, 2014
@AaronSchulz
Copy link
Author

orientdb {db=WikiData}> explain select from index:ProperyIdIdx limit 1000

Profiled command '{user:#5:0,elapsed:3.559869,resultType:collection,resultSize:1000}' in 0.004000 sec(s):
{"@type":"d","@Version":0,"user":"#5:0","elapsed":3.559869,"resultType":"collection","resultSize":1000,"@fieldTypes":"elapsed=f"}
orientdb {db=WikiData}> explain select id from index:ProperyIdIdx limit 1000

Profiled command '{optimizationElapsed:0,user:#5:0,elapsed:4.19173,resultType:collection,resultSize:1000}' in 0.005000 sec(s):
{"@type":"d","@Version":0,"optimizationElapsed":0,"user":"#5:0","elapsed":4.19173,"resultType":"collection","resultSize":1000,"@fieldTypes":"optimizationElapsed=l,elapsed=f"}

Schema is at https://github.com/AaronSchulz/WikiDataQueryOrient/blob/master/sql/schema.sql .

@lvca
Copy link
Member

lvca commented Dec 26, 2014

So times are comparable, right? I'm closing it.

@AaronSchulz
Copy link
Author

"explain" is fast, but without explain you can see the difference (see the initial times). It might be something in the console code that formats and displays the results.

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

3 participants