Does 'truncate' on a Schema class means that I remove all instances of
that class on the database?
I do use polymorphism, and I guess the truncate() does not handle
that?
Could I then just traverse the whole schema tree and truncate() each
class to empty the database?
I get around 500 files since I do use quite some schema classes, but
that is not a problem and if keeping them physical speeds it up I'll
keep it like that.
Only time it seems to affect me is when opening/closing/creating/
deleting the whole database, then it takes a couple of seconds for
each action.
/Konrad
On Dec 16, 10:38 am, Luca Garulli <
l.garu...@gmail.com> wrote:
> 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@
>