It's a simple 'order by <property> desc' to get only the newest objects at the top of the list. The property is not in the schema and its a string with a ISO Format date. I've already tried 'order by @rid desc' that is very fast but it doesn't work considering cluster rotation. Thank you. André
Em quinta-feira, 12 de outubro de 2017 06:25:00 UTC-3, Enrico Risa escreveu: > > Hi André > > which is the query that you want to order by? > > Is it a simple `select from class order by field` ? > > 2017-10-11 23:55 GMT+02:00 André Toscano <andre....@gmail.com > <javascript:>>: > >> Hello everyone, >> firstly, congratulations for everything. It's a real nice community. >> I would like to ask about fast approaches to sort data in queries. >> I'm in a struggle sorting data. >> For "where" clauses I almost cover every need I have using Lucene indexes >> because they are faster than the common indexes. But "order by" costs me so >> much time and I'm not finding a solution. >> E.g.: A "select" in a Class with 103000 objects costs me 5s. It's to much >> because I'm setting a limit and still use that amount of time. Maybe I'm >> doing something wrong. >> Any thaughts about? >> Thanks in advance. >> >> André Emilio Toscano >> >> -- >> >> --- >> 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 <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- --- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.