-
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
Problem with Filtering #8877
Comments
Hi @redfox1993 In this case, both I'd suggest you to use a MATCH statement instead:
Thanks Luigi |
Hi Luigi, Thank you for your fast response. I will test your suggestion in the let area :) |
hi @luigidellaquila, that match statement takes too long. In dm_document are ~4mio inserts. The question is: why does the first query with variable dont work, even if the variable has the same value like the second query? |
Hi @redfox1993 How many Document records do you have? Thanks Luigi |
Hi Luigi, This is the point. I have a select on the document Vertex. This Vertex has a field lastversion_id an edges to some vertices from class Version. I dont want all versions at this point but the one with the lastversion_id as id. So i dont understand that the second query from the start post works, but the First dont |
Hi @redfox1993 Not sure I got the point, do you have a WHERE condition in the SELECT? Thanks Luigi |
Hi Luigi, The Vertex "Version" has a unique id which is in the Vertex "document" the lastversion_id to get the last Version of the document. I want to Filter the multiple versions in Vertex"version" to get only the latest one, but this doesnt work. If i replace the lastversion_id with the integer directly i got the expected result. But i want to take the variable lastversion_id. |
Hi @redfox1993 Property names in square brackets refer to the "bracketed" document. In this case, when you write The SELECT and the MATCH have comparable execution time, so there is no reason why the former (that btw does not do what you expect) should be faster than the latter. What I didn't get is if you need to calculate the version for a specific document or for all the documents in the DB. Can you please post an example of the complete query? Thanks Luigi |
Hi Luigi, I have migrate an rdbms (mssql) to orientdb and want to rebuild a query with many joins. this is what i did so far: select at: result: i want something like: |
OrientDB Version: 3.0.18
I am new at OrientDB
I have a problem with the following query:
select in('VersionHasDoc')[id = lastversion_id] as lastVersion, lastversion_id from document
This returns empty brackets.
lastVersion | lastversion_id
[] | 1657
But if i do directly:
select in('VersionHasDoc')[id = 1657] as lastVersion, lastversion_id from document
returns as expected:
lastVersion | lastversion_id
#71:6 | 1657
Is there a syntax fault from my side?
The text was updated successfully, but these errors were encountered: