Thanks a lot for the advice
On Friday, 5 June 2015 10:49:45 UTC+1, Luigi Dell'Aquila wrote: > > Hi James, > > traverse in() from #12:0 > > does not only return John's friends, but also his friends of friends, > friends of friends of friends and so on, maybe that's the problem. > You could try replacing it with select in() from #12:0 > > Luigi > > > 2015-06-04 10:06 GMT+02:00 James Wang <[email protected] <javascript:>>: > >> Hi All, >> >> I am new to OrientDB and like it. >> >> I have two classes: users and userFriends >> users class, with properties like name, email (unique) et al, has 9m fake >> records and userFriends class >> (with properties like name, group et al) has 1m fake records; >> >> For statistic purpose, I need to find out, for example, those who are not >> John (whose @RID #12:0 in userFirends class) friends. The query I run: >> select * from users where email not in (select email from (traverse in() >> from #12:0)) limit 10; >> >> "traverse in() from #12:0" has 20000 edges (i.e. John has 20000 friends - >> too many - is it not? - just for testing ideas) >> >> What have I done wrong please? >> >> BTW, if users only has 1m records and John only has only 2000 friend, the >> query "select * from users where email not in (select email from (traverse >> in() from #12:0)) limit 10;" only took 0.2 seconds >> >> Please help >> >> Thanks a lot in advance >> James >> >> -- >> >> --- >> 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 [email protected] <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 [email protected]. For more options, visit https://groups.google.com/d/optout.
