And if there are many classes, is there any way to do it through a for? Getting all kinds of classes and truncating?
El jueves, 16 de diciembre de 2010, 10:38:56 (UTC+1), Lvc@ escribió: > > Hi, > you could truncate an entire class in this way: > > OClass cls = currentDatabase.getMetadata().getSchema().getClass("Vehicle"); > cls.truncate(); > > If you're not using polymorphism against vertexes and edges type just: > > > currentDatabase.getMetadata().getSchema().getClass("OGraphVertex").truncate(); > > currentDatabase.getMetadata().getSchema().getClass("OGraphEdge").truncate(); > > For the number of files probably you've a lot of classes. You could use > LOGICAL cluster instead of PHYSICAL (default): > http://code.google.com/p/orient/wiki/Concepts#Cluster > > Lvc@ > > On 16 December 2010 10:32, Konrad <konrad....@gmail.com <javascript:>> > wrote: > >> Hi, >> >> I'm wondering what is the fastest way of emptying a ODatabaseGraphTx >> of all vertexes and edges? >> (would be nice if schema still stays). >> >> Actually deleting the database and re-creating it takes quite some >> time (like 10 sec) (OrientDB deleting and creating a bunch of files on >> disk). >> >> >> >> Kind regards, >> Konrad Eriksson >> InfraSight Labs AB - Insight Into IT Infrastructure >> Web: http://www.infrasightlabs.com > > > -- --- 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.