Hi, Do not use ONativeSynchQuery it is much slower than SQL.
On Mon, Feb 3, 2014 at 4:21 PM, Mohammed LOUKILI EL FAHSSI < m.louk...@skypaz.com> wrote: > can't find ONativeSynchQuery class, which jar to the client app? > > > On Thursday, January 10, 2013 4:33:05 PM UTC+1, Adam Walczak wrote: >> >> Thx for the respoce. >> >> 3) yes, we support such range queries >>> >> >> just to have no doubt: >> - OrientDB uses indexes to report them, yes ? >> - it does not have to iterate over the all documents, the index already >> idicates which ones have obj.number > 8 ? >> - it doesn't have to do any not index wise sorting algorithm, it can give >> back an ordered set just by navigating the index ? >> >> >> >>> 4) there is but it's poor supported: Native Query. Example: >>> >>> >>> ONativeSynchQuery<OQueryContextNative> q = >>> (ONativeSynchQuery<OQueryContextNative>) >>> new >>> ONativeSynchQuery<OQueryContextNative>( >>> database, "Profile", new OQueryContextNative()) { >>> >>> @Override >>> public boolean filter(OQueryContextNative iRecord) { >>> return iRecord.field("location").field("city").field("name"). >>> eq("Rome").and().field("name").like("G%").go(); >>> } >>> >>> @Override >>> public void end() { >>> }; >>> }.setLimit(20); >>> >>> List<ODocument> result = (List<ODocument>) q.execute(); >>> >> >> But is this really a query. When using the above code does OrientDB use >> the index to find the location with the given city name ? >> Or does it iterate over ALL locations and perform comparisons on each one >> ? >> > -- > > --- > 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/groups/opt_out. > -- Best regards, Andrey Lomakin. Orient Technologies the Company behind OrientDB -- --- 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/groups/opt_out.