Order BY @RID DESC stops working in 2.2

139 views
Skip to first unread message

hartmut bischoff

unread,
Jun 8, 2016, 12:20:38 PM6/8/16
to OrientDB
Hi altogether

I am in the process of adapting ActiveOrient (https://github.com/topofocus/active-orient) to Version 2.2.
And found that  DatabaseClass#Last returns the first instead of the last record.

The following query is transmitted by the test-suite:

 select  from industry  order by @rid desc

The result is the same as

 select  from industry


I verified this in studio.
The documentation @ http://orientdb.com/docs/2.2/SQL-Query.html
refers explicit to this feature:


Return records from the class Profile in descending order of their creation:

orientdb> SELECT FROM Profile ORDER BY @rid DESC

Beginning in version 1.7.7, OrientDB can open an inverse cursor against clusters. This is very fast and doesn't require the classic ordering resources, CPU and RAM.


Is this a bug or missed I something?

hartmut

Luigi Dell'Aquila

unread,
Jun 9, 2016, 4:59:23 AM6/9/16
to orient-...@googlegroups.com
Hi,

could it depend on multiple clusters per class? How many clusters does your "industry" class have?

I tried in Studio the query

SELECT FROM OUser ORDER BY @rid DESC

and it worked fine...

Thanks

Luigi

--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

hartmut bischoff

unread,
Jun 9, 2016, 12:30:04 PM6/9/16
to OrientDB


On Thursday, June 9, 2016 at 10:59:23 AM UTC+2, Luigi Dell'Aquila wrote:
Hi,

could it depend on multiple clusters per class? How many clusters does your "industry" class have?

I tried in Studio the query

SELECT FROM OUser ORDER BY @rid DESC

and it worked fine...


Just tried it again:


SELECT FROM the_dataset ORDER BY @rid DESC limit 1

gives the same result then

SELECT FROM the_dataset ORDER BY @rid  limit 1

and

SELECT FROM the_dataset ORDER BY @rid ASC limit 1



Its a very small test-database  ...


Luigi Dell'Aquila

unread,
Jun 10, 2016, 3:29:22 AM6/10/16
to orient-...@googlegroups.com
Ok, I got the point, the ordering is correctly done on RIDs in the same cluster, but clusters are not iterated in the correct order.
Could you please open an issue about this? I'll work on it asap

Thanks

Luigi

acsandeep

unread,
Sep 14, 2016, 3:20:00 AM9/14/16
to OrientDB
Was the bug fixed? I am getting the same issue with 2.2.7 stand alone server.

scott molinari

unread,
Sep 14, 2016, 5:26:05 AM9/14/16
to OrientDB
I keep pretty good track of the things happening in the project. To be honest, I think this might have fallen through the cracks, as I've not seen this issue in the bug reports.

Scott

topofocus

unread,
Sep 14, 2016, 5:45:58 AM9/14/16
to orient-...@googlegroups.com
Perhaps its my fault, I haven'd manage to create a ticket (never done
it, even not registrated jet.)
Maybe someone more familiar with this can create it in no time.

alessand...@gmail.com

unread,
Sep 14, 2016, 6:05:31 AM9/14/16
to OrientDB
Hi Hartmut,
I opened an issue to your problem (link)

Kind regards,
Alessandro

scott molinari

unread,
Sep 14, 2016, 6:11:00 AM9/14/16
to OrientDB
Thanks Alessandro!

Scott

Luigi Dell'Aquila

unread,
Sep 21, 2016, 11:11:12 AM9/21/16
to orient-...@googlegroups.com
Hi guys, I just pushed a fix for this on 2.2.x

Thanks

Luigi


2016-09-14 12:11 GMT+02:00 'scott molinari' via OrientDB <orient-...@googlegroups.com>:
Thanks Alessandro!

Scott

--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages