Hi, use this select from <rid> where @this instanceof 'V' --> to verify wheter it's a Vertex select from <rid> where @this instanceof 'E' --> to verify wheter it's an Edge
Il giorno martedì 13 settembre 2016 15:06:35 UTC+2, André Toscano ha scritto: > > Hi guys, since now I was just watching the discussions. > I have I doubt that: What is the fastest way to ensure that a RID is from > a vertex or an edge? > I was doing: > > select from V where @rid = #<some_rid> > > If I get the record it will be a vertex. This is a very expensive query, > almost 2s in my system. > This is much faster: > > select from #<some_rid> where @class = 'V' or @class in (SELECT name from > (select expand(classes) from metadata:schema) where 'V' in superClasses) > > This is executed in 40ms > But if I ask directly for the RID: > > select from #<some_rid> > > It takes 10 to 20ms > > My ask is if there is a faster way (below of 40ms) to check the RID object > type. > Best regards > 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
